Results 1 to 2 of 2

Thread: Transaction Timeout (WebSphere, DataSource DB2)

  1. #1
    Join Date
    Sep 2004
    Posts
    9

    Default Transaction Timeout (WebSphere, DataSource DB2)

    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:

    Code:
     TransactionTemplate tt = new TransactionTemplate( ptm);
     tt.execute( new TransactionCallbackWithoutResult() {
        protected void doInTransactionWithoutResult( TransactionStatusts){
           daoCity.updateCity( aCity);
        }
     });
    The tt.execute runs ok, no exception, but I get a TransactionTimeout after 120 Sec.
    Is something missing in my code to close the transaction ???
    Thank you for help !

  2. #2
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    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...
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. Unit testing with JOTM and JtaTransactionManager
    By lalle in forum Architecture
    Replies: 1
    Last Post: Oct 15th, 2005, 09:05 AM
  2. Replies: 0
    Last Post: Jun 6th, 2005, 06:22 AM
  3. Replies: 5
    Last Post: May 4th, 2005, 10:49 PM
  4. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  5. Transaction pb Hibernate/MySQL
    By syluser in forum Data
    Replies: 2
    Last Post: Aug 28th, 2004, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •