This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes Usage of JTA for Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Usage of JTA for Servlets" Watch "Usage of JTA for Servlets" New topic
Author

Usage of JTA for Servlets

Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Hi,
I am using jsp,servlets,oracle Database (Single Database) and weblogic Server. My application will interact with 50 tables. How to take care the transaction control. Which one is advisable, JDBC API based Transaction commit & Rollback OR JTA based Transation (UserTransaction methods like begin(), commit and Rollback).
I am not going to use any EJB and RMI for this applications.
Just because having weblogic server whether we have to use the JTA or what?
Thanks & Regards,
M.S.Raman
Rohan Patil
Greenhorn

Joined: Jan 04, 2001
Posts: 6
Hi !
If you are not using EJB, then use in your JSP or Servlet
con.setAutoCommit(false);
After doing your trans. processing, use
com.commit() or com.rollback() as per ur req.
Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Originally posted by Rohan Patil:
Hi !
If you are not using EJB, then use in your JSP or Servlet
con.setAutoCommit(false);
After doing your trans. processing, use
com.commit() or com.rollback() as per ur req.


Thanks for your Information. But what will happen if i use JTA? Is there any performance problem if we use JTA for Servlet based application.
Regards,
M.S.Raman.
Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Originally posted by Rohan Patil:
Hi !
If you are not using EJB, then use in your JSP or Servlet
con.setAutoCommit(false);
After doing your trans. processing, use
com.commit() or com.rollback() as per ur req.


Thanks for your Information. But what will happen if i use JTA? Is there any performance problem if we use JTA for Servlet based application.
Regards,
M.S.Raman.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Usage of JTA for Servlets