aspose file tools
The moose likes Other Java Products and Servers and the fly likes Managing transaction (non-xa or say local) in Mysql + JDBC + Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Managing transaction (non-xa or say local) in Mysql + JDBC + Tomcat" Watch "Managing transaction (non-xa or say local) in Mysql + JDBC + Tomcat" New topic

Managing transaction (non-xa or say local) in Mysql + JDBC + Tomcat

Mihir K Parekh

Joined: Jul 20, 2012
Posts: 11
Hello all readers,
Please help me to solve this problems.

My development sources
Struts 1.3
Mysql 5.1.63
Tomcat 6.x and
custom framework for Object relational mapping.

what i have been trying to do since six last month , to manage commit and rollback on single mysql database with some single class. i first try to implement JOTM transaction manager but it is deprecated so then i successfully integrate the ATOMIKOS open source transaction manager but with it insertion is commited perfectly but not deletion and updation. I am using a single JDBCUtility class to perform all the database operation which gets data source from JNDI data source of tomcat. and i am using that JDBCUtility class from classes which extends BaseBusinessObject from my custom everything is accessed from service framework (which i implemented in custom framework) , and all the services called from single class called BlfServiceBean which should be capable of commiting to database if everything is success or rolled back to previous state if anything is wrong (means any error occurs).

below is code from which i get data source

private DataSource getDataSource(Context ctx) throws Exception {
return (DataSource) ServiceLocator.getDataSource(ConfigurationManager

so the Connection object is only available to JDBCUtility class , how can i perform commit and rolllback operation on the same connection object in BlfServiceBean.

if any questions please write here i can post my whole code here. but i want to solve this
problem .

Thank You
Mihir Parekh
Have you tried LearnNowOnline?
subject: Managing transaction (non-xa or say local) in Mysql + JDBC + Tomcat