• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cross JVM transactions - Architecture issues

 
Alok Pota
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic