• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cross JVM transactions - Architecture issues

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic