I must be missing something, but the way it is written, method2 *should*
execute every time. If you don't want method2 to execute, unless method1
completes successfully, you should create method3 that invokes method1 and
method2.
jim
----- Original Message -----
From: Sameer Tyagi <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 05, 2000 10:09 AM
Subject: Exceptions and Transactions
> onsider a statless CMT bean with 2 methods, method1() and method2().
>
> method1() invokes method2() like below.
>
> public void method1(){
> try{
> >>>>> Some sql code...
> }catch(SQLExceptoin e){
> file://do something here
> }
> method2();
> }
>
> To preserve integrity,method2 must be executed when the preceeding sql
> code is sucessfully executed.
>
> How can this be done with transactions WITHOUT doing a return in the
> catch block ???
>
> No matter what attributes are set in the dd for both the methods,the
> method2() always seem to
> execute.?
>
> Any ideas ?
> -Sam
>
>
===========================================================================
> 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".