aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Distributed Trx in diferent VM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Distributed Trx in diferent VM" Watch "Distributed Trx in diferent VM" New topic
Author

Distributed Trx in diferent VM

Haroldo Nascimento
Ranch Hand

Joined: Aug 14, 2003
Posts: 79
Hi,

I would like to know if is possible this situation:

My application RMI client:

1- get the XAResource xaR1
2- create Xid1
3- xaR1.start(Xid1)
4-doAnyThingDB1("insert into table_Client ...")
5- xaR1.end(Xid1)
6- call the method of app Server RMI passing the Xid

and the appSever RMI:
1- get the XAResource xaR1 (same the appClient)
2- create Xid2
3- xaR1.start(Xid2)
4-doAnyThingDB2("insert into table_Server ...")
5- xaR1.end(Xid2)
6- prepare(Xid2)
7- commit(Xid2)

After the conclution of method remote, There will register in the table_Server and table_Client or only on table_Server ?

I need that the fisrt result is the correct, else what I can do to control transaction distributes in diferent VMs.

thanks
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Distributed transactions are .... well .... distributed. JVMs mean nothing to them. Sad, huh? No seriously, that's what distributed transactions are for. Just start the transaction, do your stuff, and commit. Don't be overthinking things here.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Distributed Trx in diferent VM
 
Similar Threads
java.rmi.ConnectException
Game Programming Problem! J2ME
Distributed Trx in diferent VM using Oracle
catching errors on inserts into multiple tables
Pagination Framework/libraries