Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Mihir K Parekh
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!