Application server-specific integration - Java-Springs

Spring's transaction abstraction generally is application server agnostic. Additionally, Spring's Jta Transaction Manager class, which can optionally perform a JNDI lookup for the JTA User Transaction and Transaction Manager objects, autodetects the location for the latter object, which varies by application server. Having access to the JTA TransactionManager allows for enhanced transaction semantics, in particular supporting transaction suspension.

Spring's Jta Transaction Manager is the standard choice to run on Java EE application servers, and is known to work on all common servers. Advanced functionality such as transaction suspension works on many servers as well -- including GlassFish, JBoss, Geronimo, and Oracle OC4J -- without any special configuration required. However, for fully supported transaction suspension and further advanced integration, Spring ships special adapters for IBM WebSphere, BEA Web Logic Server, and Oracle OC4J.

For standard scenarios, including Web Logic Server, Web Sphere and OC4J, consider using the convenient <tx:jta-transaction-manager/> configuration element. When configured, thiselement automatically detects the underlying server and chooses the best transaction manager availablefor the platform. This means that you won't have to configure server-specific adapter classes explicitly; rather, they are chosen automatically, with the standard JtaTransactionManager as default fallback.

IBM WebSphere

On WebSphere 6.1.0.9 and above, the recommended Spring JTA transaction manager to use is Web Sphere Uow Transaction Manager. This special adapter leverages IBM's UOW Manager API, which is available in Web Sphere Application Server 6.0.2.19 and later and 6.1.0.9 and later. With this adapter, Spring-driven transaction suspension (suspend/resume as initiated by PROPAGATION_REQUIRES_NEW) is officially supported by IBM!

BEA WebLogic Server

On WebLogic Server 9.0 or above, you typically would use the Web Logic Jta Transaction Manager instead of the stock Jta Transaction Manager class. This special Web Logic-specific subclass of the normal Jta Transaction Manager supports the full power of Spring's transaction definitions in a Web Logic-managed transaction environment, beyond standard JTA semantics: Features include transaction names, per-transaction isolation levels, and proper resuming of transactions in all cases.

Oracle OC4J

Spring ships a special adapter class for OC4J 10.1.3 or later called OC4 JJta Transaction Manager. This class is analogous to the Web Logic Jta Transaction Manager class, providing similar value-adds on OC4J: transaction names and per-transaction isolation levels. The full JTA functionality, including transaction suspension, works fine with Spring's Jta Transaction Manager on OC4J as well. The special OC4 JJta Transactio Manager adapter simply provides value-adds beyond standard JTA.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Java-Springs Topics