Hi, Can I implement 2 phase commit in a standalone java application ? I access multiple databases with different connection objects in a single class in a single transaction. But how do I implement the 2 phase commit manually in a java standalone application. Please note that I dont have any environment(like server, jndi etc.,) where i can deploy the datasources. So pls let me know whether i can implement distributed transactions in this scenario. This is very urgent.
Sigh... But JTA requires the implementation of a Transaction Manager -- which are only implemented in applicatoin servers... My question is WHY can't you start up a copy of an application server (even something free like JBoss or Pramati) to act as your Transaction manager and to define your datasources? Then your Java program would just be a normal J2EE Java client... (even though there would be no EJB's or Web apps). Kyle
HI, u dont need to have a application server to make use of TransactionManager. There are many transcation manager available for free like "atomikos TransactionJTA" which provide TransactionManager. Just use its class directly and have your work done by it i.e. 2PC . Regards, Akhil Nagpal
Joined: Aug 31, 2001
Thnks a lot Kyle and Nagpal, I'll surely try your suggestions. These would be of great help for me probably.
subject: 2 phase commit in java !!!!!!!!! URGENT!!!!!!!!!!!