Package javax.ejb

Examples of javax.ejb.EJBTransactionRolledbackException


   @Override
   public void handleEndTransactionException(Exception e)
   {
      if(e instanceof RollbackException)
         throw new EJBTransactionRolledbackException("Transaction rolled back", e);
      super.handleEndTransactionException(e);
   }
View Full Code Here


      // if it's not EJBTransactionRolledbackException
      if(!(t instanceof EJBTransactionRolledbackException))
      {
         if(t instanceof Error)
         {
            t = new EJBTransactionRolledbackException(formatException("Unexpected Error", t));
         }
         // If this is an EJBException, pass through to the caller
         else if (t instanceof EJBException || t instanceof RemoteException)
         {
            // Leave Exception as-is (this is in place to handle specifically, and not
            // as a generic RuntimeException
         }
         else if(t instanceof RuntimeException)
         {
            t = new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);
         }
         else // application exception
         {
            throw t;
         }
View Full Code Here

   protected void handleEndTransactionException(Exception e)
   {
      if (e instanceof RollbackException)
      {
         throw new EJBTransactionRolledbackException("Transaction rolled back", e);
      }
      throw new EJBException(e);
   }
View Full Code Here

      {
         if (t instanceof Error)
         {
            //t = new EJBTransactionRolledbackException(formatException("Unexpected Error", t));
            Throwable cause = t;
            t = new EJBTransactionRolledbackException("Unexpected Error");
            t.initCause(cause);
         }
         // If this is an EJBException, pass through to the caller
         else if (t instanceof EJBException || t instanceof RemoteException)
         {
            // Leave Exception as-is (this is in place to handle specifically, and not
            // as a generic RuntimeException
         }
         else if (t instanceof RuntimeException)
         {
            t = new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);
         }
         else // application exception
         {
            throw (Exception) t;
         }
View Full Code Here

    private Throwable mapLocal3xException(Throwable t) {

        Throwable mappedException = null;

        if( t instanceof TransactionRolledbackLocalException ) {
            mappedException = new EJBTransactionRolledbackException();
            mappedException.initCause(t);
        } else if( t instanceof TransactionRequiredLocalException ) {
            mappedException = new EJBTransactionRequiredException();
            mappedException.initCause(t);
        } else if( t instanceof NoSuchObjectLocalException ) {
View Full Code Here

                return e;
            }
        }
        if (e instanceof TransactionRolledbackException) {
            if (!rmiRemote && interfaceType.isBusiness()) {
                return new EJBTransactionRolledbackException(e.getMessage()).initCause(getCause(e));
            } else if (interfaceType.isLocal()) {
                return new TransactionRolledbackLocalException(e.getMessage()).initCause(getCause(e));
            } else {
                return e;
            }
View Full Code Here

/*    */     {
/* 86 */       log.error(t);
/* 87 */       throw t;
/*    */     }
/*    */
/* 91 */     Throwable ejbtre = new EJBTransactionRolledbackException(t.getMessage(), (Exception)t);
/* 92 */     log.error(ejbtre);
/* 93 */     throw ejbtre;
/*    */   }
View Full Code Here

                return e;
            }
        }
        if (e instanceof TransactionRolledbackException) {
            if (!rmiRemote && interfaceType.isBusiness()) {
                return new EJBTransactionRolledbackException(e.getMessage()).initCause(getCause(e));
            } else if (interfaceType.isLocal()) {
                return new TransactionRolledbackLocalException(e.getMessage()).initCause(getCause(e));
            } else {
                return e;
            }
View Full Code Here

    private Throwable mapLocal3xException(Throwable t) {

        Throwable mappedException = null;

        if( t instanceof TransactionRolledbackLocalException ) {
            mappedException = new EJBTransactionRolledbackException();
            mappedException.initCause(t);
        } else if( t instanceof TransactionRequiredLocalException ) {
            mappedException = new EJBTransactionRequiredException();
            mappedException.initCause(t);
        } else if( t instanceof NoSuchObjectLocalException ) {
View Full Code Here

    private Throwable mapLocal3xException(Throwable t) {

        Throwable mappedException = null;

        if( t instanceof TransactionRolledbackLocalException ) {
            mappedException = new EJBTransactionRolledbackException();
            mappedException.initCause(t);
        } else if( t instanceof TransactionRequiredLocalException ) {
            mappedException = new EJBTransactionRequiredException();
            mappedException.initCause(t);
        } else if( t instanceof NoSuchObjectLocalException ) {
View Full Code Here

TOP

Related Classes of javax.ejb.EJBTransactionRolledbackException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.