• Post Reply Bookmark Topic Watch Topic
  • New Topic

user transaction from servlet or a nornal java class  RSS feed

 
anil bisht
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
How can i use the user transaction from a servlet or a normal jave class. Its basically how can i get the user transaction object to start the transaction.
A piece of code could be helpful
TIA
Anil
 
Junaid Bhatra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would basically get it from the Context. For eg:

[ May 03, 2002: Message edited by: Junaid Bhatra ]
 
anil bisht
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This line gives me error..
UserTransaction utx = (UserTransaction)context.lookup("javax.transaction.UserTransaction
how do i bind the name ??

Regrds
Anil
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!