This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Transaction Timeout (WebSphere, DataSource DB2)

Sep 29th, 2004, 03:19 PM

Hi,
I work with WSAD5.1.2/WebSphere5.1 test environment.
Using the JtaTransactionManager to write in a DB2 v8.1.3 datasource (the ds is ok, i can read/write without any problem), if i code a manual transaction via TransactionTemplate:

The whole point of the TransactionTemplate is that it manages the lifecycle of the transaction, so you don't have to do anything to commit.

But if you are using JTATransactionManager, keep in mind that you will basically be participating in any existing JTA transactions, so if there are any ongoing, the end of the template will not force a real commit of the real transaction.

Also, as per the JTATransactionManager JavaDocs, you might try setting the transactionManager property to use WebSphereTransactionManagerFactoryBean, so Spring can find and use the JTA TransactionManager object in the environment, not just the UserTransaction object, although this shouldn't make a difference...