Rashid,
The best most predictable way to cause a rolleback to occur is the use of
the EntityContext.setRollbackOnly() methods. The use of exceptions to
rollback transactions is problematic, and differs from version to version of
EJB.
So
try
{
// blah blah
}
catch(Exception e)
{
_entityContext.setRollbackOnly();
e.printStackTrace();
// maybe throw user or system exception
}
Dave Wolf
Internet Applications Division
Sybase
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Raashid Khan
> Sent: Tuesday, October 03, 2000 7:51 AM
> To: [EMAIL PROTECTED]
> Subject: Rollback in Transaction???
> Importance: High
>
>
> Hi,
>
> I am having a problem with rollback in a transaction. The job I
> am trying to
> accomplish is to update multiple tables in the same transaction, using the
> same connection .If in between the process I get a system exception , no
> rollback is happing automatically. I suppose till the transaction is over
> rollback should happen if the transaction is not completed.
> Can anyone help me out with this pleas.
> I am using BMP with container managed transaction. I have defined the
> Transaction attribute in the deployment descriptor as Required.
>
> Thanks in advance.
>
> Rashid.
>
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".