File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Cross JVM transactions - Architecture issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Cross JVM transactions - Architecture issues" Watch "Cross JVM transactions - Architecture issues" New topic
Author

Cross JVM transactions - Architecture issues

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
I have 3 JVMs (a,b,c) of which JVM-a is the server JVM (say), the server JVM has a transaction manager that keeps tracks of all the local transactions, local connection pools and the resources (connections) it doles out to the other JVMs (b & c) which I call agents.
Agents need resources (connections to databases) which the server maintains. Agent b and c need 1 connection each, to different databases. Server therefore needs to simulate a 2-PC transaction.

Agents typically send a message to the server to ask for connection. The server doles out a connection, enlists it in a transaction and sends it to the agent. The agent then uses it to do its SQL work. Let say b and c operate sequentially, i.e b asks server to checkpoint then c asks server for connection and finally c signals server to commit.

The problem with all the above is that the JVMs communicate using JMS and I canot pass the enlisted java.sql.Connection around. The other approach would be to have the agents send all its workload to the server.
(some XML'ized SQL job). The server then executes it. The problem is that defeates the purpose of having an agent in the first place.
I don;t know how commercial transaction systems work acorss distributed JVMs. It would be intersting to know what folks experienced with theese issues have to say..
Thanks
Alok
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cross JVM transactions - Architecture issues