• Post Reply Bookmark Topic Watch Topic
  • New Topic

UserTransaction and DB transaction  RSS feed

 
Haroldo Nascimento
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have the simple class (client standalone) que management the transacation using JTA. I would like control the DB transaction too.
How I can implement my client to that when I use userTrx.commit(), I commit the DB transaction com command commit too.

UserTransaction userTrx = (UserTransaction)jndiCtx.lookup("jta/usertransaction");

userTrx.begin();

insertInfoDB();

// This command commit must commit the JTA and DB transaction. Its is possible ?
userTrx.commit();
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!