Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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 like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic