| WebSphere-specific PlatformTransactionManager implementation that delegates
to a
com.ibm.wsspi.uow.UOWManager instance, obtained from WebSphere's
JNDI environment. This allows Spring to leverage the full power of the WebSphere
transaction coordinator, including transaction suspension, in a manner that is
perfectly compliant with officially supported WebSphere API.
The
CallbackPreferringPlatformTransactionManager interface
implemented by this class indicates that callers should preferably pass in
a
TransactionCallback through the
WebSphereUowTransactionManager.execute method, which
will be handled through the callback-based WebSphere UOWManager API instead
of through standard JTA API (UserTransaction / TransactionManager). This avoids
the use of the non-public javax.transaction.TransactionManager
API on WebSphere, staying within supported WebSphere API boundaries.
This transaction manager implementation derives from Spring's standard
JtaTransactionManager , inheriting the capability to support programmatic
transaction demarcation via getTransaction / commit /
rollback calls through a JTA UserTransaction handle, for callers
that do not use the TransactionCallback-based
WebSphereUowTransactionManager.execute method. However,
transaction suspension is not supported in this getTransaction
style (unless you explicitly specify a
WebSphereUowTransactionManager.setTransactionManager reference,
despite the official WebSphere recommendations). Use the
WebSphereUowTransactionManager.execute style
for any code that might require transaction suspension.
This transaction manager is compatible with WebSphere 7.0 as well as recent
WebSphere 6.0.x and 6.1.x versions. Check the documentation for your specific
WebSphere version to find out whether UOWManager support is available. If it
is not available, consider using Spring's standard
JtaTransactionManager class, if necessary specifying the
WebSphereTransactionManagerFactoryBean as "transactionManager" through the corresponding bean property. However, note
that transaction suspension is not officially supported in such a scenario
(despite it being known to work properly).
The default JNDI location for the UOWManager is "java:comp/websphere/UOWManager".
If the location happens to differ according to your WebSphere documentation,
simply specify the actual location through this transaction manager's
"uowManagerName" bean property.
author: Juergen Hoeller since: 2.5 See Also: WebSphereUowTransactionManager.setUowManager See Also: WebSphereUowTransactionManager.setUowManagerName See Also: com.ibm.wsspi.uow.UOWManager |