1 Reply Latest reply on Mar 10, 2002 9:36 PM by Mac Rinehart

    transaction problem

    ywhking Newbie

      hi,
      Can somebody tell me what kind of exception can cause tranction?
      I defined a exception of my own which extends Exception.But when it was thrown out,the tranction didn't happen,when I replaced it with RemoteException then it happened,can somebody tell me why?
      thanks ahead!

      ywhking

        • 1. Re: transaction problem
          Mac Rinehart Newbie

          Are you trying to get the transaction to rollback when an exception is thrown? If so your Exception has to extend java.lang.RuntimeException. Encountering an unexpected RemoteException will also cause a transaction to rollback, but throwing a RemoteException to rollback a transaction is not a good practice.