• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I use Transaction API in non-EJB apps

 
Rohit Gandhe
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,
Can somebody tell me if there is any way to use the transaction API in non-EJB applications?
For example: I have just a servlet/JSP application, but I would like to use javax.transaction.* for handling DB transactions, instead of making my own transactions by manipulating autoCommit and what not.
Is there any way? Has anyone done this before?
Thanks,
Rohit
 
Milton Quranda
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use Java transaction api in a JSP or Servlet but you'll have to compile and run it in a J2EE engine. e.g. if you have a jsp page calling two java beans having their own connection instance performing a dabase action, but if one beans throws and exception the other bean also has to rollback the activity. In such case you have to use the transaction API. Rest figure it out
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!