Win a copy of Spark in Action this week in the Open Source Projects forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

RemoteException/EJBException

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a client receives a RemoteException/EJBException, what's will be the transaction status on the server side?. Will it not be a "automatic rollback" in case of CMT... and we explicitly rollback in case of a BMT ???
(Assume we don't know whether the bean threw a System Exception or not )
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You are right. In case of CMT, the transaction will be automatically rolled back when system exceptions are thrown.

But for BMT, we have to rollback the transaction explicitly or otherwise the transaction will be active till *time-out* occurs.
[ August 18, 2004: Message edited by: Keerthi P ]
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Keerthi,

If you look at tables 16 and 18 on pages 377 and 378 of the specs, you'll see that, even for BMTs, the Container will rollback the transaction in case a system exception is thrown from a business method.

Regards,

Phil.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To Handle the exceptions thrown by the business method, in a bean-managed transaction demarcation.

If its a system exception: The container would mark it for rollback, which means even if the client continues to use the transaction, It would be fruitless.

According to Spec: Table 16 says
Mark for rollback a
transaction that has been
started, but not yet completed,
by the instance.
 
Keerthi P
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks NaslaiShobha and Phillipe for clarifying this.
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic