aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JTA with IMS Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JTA with IMS Transactions" Watch "JTA with IMS Transactions" New topic
Author

JTA with IMS Transactions

Stephen Nimmo
Greenhorn

Joined: Oct 15, 2003
Posts: 6
ok.
Here we go. I am trying to access multiple databases for updates and want them all within the same transaction. The kicker is that one of the databases is IMS on OS/390. We want to use JDBC for all connectivity. Here is some pseudocode of what I want to be able to do:
Get New Transaction;
Begin Transaction;
try{
Update Oracle Database(data);
Update DB2 Database(data);
Update IMS Database(data);
Commit Transaction;
} catch {
RollBack Transaction;
}
Here are the questions:
1) Does anyone know of a JDBC driver product that allows 2-Phase commits with IMS via JDBC?
2) Will JTA be able to handle the transaction if it hits multiple databases?
3) Will JTA support the transaction with IMS?
and even more the question is...Can I ACTUALLY do this? Right now, our solution is to use JTA to handle all the work except for the IMS updates and then if the IMS transction is successful, then commit the other database updates.
Any help will be greatly appreciated.
Stephen
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Yes, this can be done on WebSphere, but not using JDBC that I know of. You can do it by combining the WebSphere support for IMS through JCA with the "Last Participant Support" for 2PC transactions with 1PC resources available in WebSphere Enterprise Edition.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Stephen Nimmo
Greenhorn

Joined: Oct 15, 2003
Posts: 6
Thank you, Kyle, for the quick response.
I have found the documentation at IBM. You wouldn't happen to have any source code for an example?
For the solution, here is what I found.
http://www.redbooks.ibm.com/redbooks/pdfs/sg246932.pdf
[ October 23, 2003: Message edited by: Stephen Nimmo ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTA with IMS Transactions