Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Finally dumping the J2EE container - is JOTM mature enough?

  1. #11
    Join Date
    Jul 2005
    Posts
    24

    Default

    Thank you Andy.
    I have tried your program.it is no problem.The problem is :
    Is your code a XA Transaction?
    I tried my codes just from:
    http://opensource2.atlassian.com/con...A+++JOTM+usage

    Is there error in my code?

  2. #12
    Join Date
    Aug 2004
    Posts
    229

    Default

    Quote Originally Posted by zjnbshifox
    Thank you Andy.
    I have tried your program.it is no problem.The problem is :
    Is your code a XA Transaction?
    I tried my codes just from:
    http://opensource2.atlassian.com/con...A+++JOTM+usage

    Is there error in my code?
    I'm not sure I understand your question... my code above uses Spring's TransactionTemplate to surround the JMS code in a transaction. In this example, the TransactionTemplate uses Spring's JtaTransactionManager, which in turn uses JOTM, which provides XA transaction services. So, my code drives the transaction using Spring abstractions, which then use JOTM to provide the actual underlying transaction. Since JOTM is XA, then I think the answer to your question is, "yes, my code is using an XA transaction". As I mention in the message above, it looks like you must be sure that you always call that JmsTemplate within a transaction.

  3. #13
    Join Date
    Jul 2005
    Posts
    24

    Default

    If I want make some Database operation in the same XA transaction,I must give these codes in the tt.execute{......} . Is that right??

  4. #14
    Join Date
    Aug 2004
    Posts
    229

    Default

    Quote Originally Posted by zjnbshifox
    If I want make some Database operation in the same XA transaction,I must give these codes in the tt.execute{......} . Is that right??
    That's right, you must put the database operation in the same "execute" (or use Spring's declarative transaction ability).

    - Andy

Similar Threads

  1. Replies: 10
    Last Post: Dec 5th, 2006, 06:14 AM
  2. Unit testing with JOTM and JtaTransactionManager
    By lalle in forum Architecture
    Replies: 1
    Last Post: Oct 15th, 2005, 09:05 AM
  3. Replies: 6
    Last Post: Sep 29th, 2005, 04:25 AM
  4. Spring in j2se web container without j2ee?
    By doubleoevan in forum Web
    Replies: 1
    Last Post: Aug 27th, 2005, 06:07 AM
  5. Spring w/o a J2EE container
    By shp in forum Container
    Replies: 4
    Last Post: May 11th, 2005, 03:01 AM

Posting Permissions

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