On 01/05/2000 at 10:46:42 AM, Sameer Tyagi <[EMAIL PROTECTED]> wrote:
public void method1(){
  try{
        >>>>> Some sql code...
      }catch(SQLExceptoin e){
        //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 ???


Um... How about something simple? Is there something that is preventing you
from doing this?

public void method1() {
  success = false;
  try{
        >>>>> Some sql code...
       success = true;
  } catch(SQLException e){
     //do something here
  }
  if (success) {
    method2();
  }
}

===========================================================================
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".

Reply via email to