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

Remote Transactions

 
author
Posts: 4342
40
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Scott Selikoff
author
Posts: 4342
40
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, the remote and local are completely different servers. The local is reading/updating data in the remote ejb (using a remote initial context).
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Scott Selikoff
author
Posts: 4342
40
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Did you just should on me? You should read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic