wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Remote Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Remote Transactions" Watch "Remote Transactions" New topic
Author

Remote Transactions

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

After connecting to a remote EJB session facade, how does one establish a transaction across multiple calls to the remote facade? In other words, does the EJB spec support remote transactions? If so, how is the transaction established? From what I can tell, the local context/transaction does not seem to extend around the remote facade calls.
[ May 29, 2008: Message edited by: Scott Selikoff ]

My Blog: Down Home Country Coding with Scott Selikoff
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
what are the resourse participating in the transaction? if both your local and remote beans (has required transaction attribute) share the same transactional resource(same datasource) then the transaction will be propogated from the local to the remote.

I hope I get your question correctly here.


Amit Tank
Linked In
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

Nope, the remote and local are completely different servers. The local is reading/updating data in the remote ejb (using a remote initial context).
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Do you need a transaction that updates multiple databases in a coordinated manner? If so, then it looks as if you need distributed transactions and the two-phase commit protocol. Does your EJB server support 2PC?


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

Nope, the local transaction and remote transaction can be completely unrelated. I just need a way to establish a transaction across the remote facade. Therefore, a 2PC is not needed. Keep in mind, each server talks to a private database.
 
 
subject: Remote Transactions