Package javax.ejb

Examples of javax.ejb.EJBTransactionRolledbackException


    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

         log.error(t);
         throw t;
      }
      else
      {
         Throwable ejbtre = new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);
         log.error(ejbtre);
         throw ejbtre;
      }
   }
View Full Code Here

        return 0;
    }

    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 it's not EJBTransactionRolledbackException
        if (!(t instanceof EJBTransactionRolledbackException)) {
            if (t instanceof Error) {
                //t = new EJBTransactionRolledbackException(formatException("Unexpected Error", t));
                Throwable cause = t;
                t = new EJBTransactionRolledbackException("Unexpected Error");
                t.initCause(cause);
            } else if (t instanceof NoSuchEJBException) {
                // If this is an NoSuchEJBException, pass through to the caller

            } else if (t instanceof RuntimeException) {
                t = new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);
            } else {// application exception
                throw (Exception) 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

                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

                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

        return 0;
    }

    protected void handleEndTransactionException(Exception e) {
        if (e instanceof RollbackException)
            throw new EJBTransactionRolledbackException("Transaction rolled back", e);
        throw new EJBException(e);
    }
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.