• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RemoteException/EJBException

 
Giju George
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 )
 
Keerthi P
Ranch Hand
Posts: 203
  • 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 ]
 
Philippe Maquet
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.
 
Naslai Shobha
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: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks NaslaiShobha and Phillipe for clarifying this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic