Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 framework.so 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
.getString("dataSourceName"));
}

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
reply
    Bookmark Topic Watch Topic
  • New Topic