Package javax.ejb

Examples of javax.ejb.TransactionRequiredLocalException


      {
         throw new NoSuchObjectLocalException(nsoe.getMessage(), nsoe);
      }
      catch(TransactionRequiredException tre)
      {
         throw new TransactionRequiredLocalException(tre.getMessage());
      }
      catch(TransactionRolledbackException trbe)
      {
         throw new TransactionRolledbackLocalException(trbe.getMessage(), trbe);
      }
View Full Code Here


     * @param method Method
     */
    protected Throwable convertException(final Throwable e, final Method method) {
        if (!remote && e instanceof RemoteException) {
            if (e instanceof TransactionRequiredException) {
                return new TransactionRequiredLocalException(e.getMessage()).initCause(getCause(e));
            }
            if (e instanceof TransactionRolledbackException) {
                return new TransactionRolledbackLocalException(e.getMessage()).initCause(getCause(e));
            }

View Full Code Here

        boolean rmiRemote = java.rmi.Remote.class.isAssignableFrom(interfce);
        if (e instanceof TransactionRequiredException) {
            if (!rmiRemote && interfaceType.isBusiness()) {
                return new EJBTransactionRequiredException(e.getMessage()).initCause(getCause(e));
            } else if (interfaceType.isLocal()) {
                return new TransactionRequiredLocalException(e.getMessage()).initCause(getCause(e));
            } else {
                return e;
            }
        }
        if (e instanceof TransactionRolledbackException) {
View Full Code Here

/*     */     {
/* 370 */       throw new NoSuchObjectLocalException(nsoe.getMessage(), nsoe);
/*     */     }
/*     */     catch (TransactionRequiredException tre)
/*     */     {
/* 374 */       throw new TransactionRequiredLocalException(tre.getMessage());
/*     */     }
/*     */     catch (TransactionRolledbackException trbe)
/*     */     {
/* 378 */       throw new TransactionRolledbackLocalException(trbe.getMessage(), trbe);
/*     */     }
View Full Code Here

/*     */     {
/* 443 */       throw new NoSuchObjectLocalException(nsoe.getMessage(), nsoe);
/*     */     }
/*     */     catch (TransactionRequiredException tre)
/*     */     {
/* 447 */       throw new TransactionRequiredLocalException(tre.getMessage());
/*     */     }
/*     */     catch (TransactionRolledbackException trbe)
/*     */     {
/* 451 */       throw new TransactionRolledbackLocalException(trbe.getMessage(), trbe);
/*     */     }
View Full Code Here

        boolean rmiRemote = java.rmi.Remote.class.isAssignableFrom(interfce);
        if (e instanceof TransactionRequiredException) {
            if (!rmiRemote && interfaceType.isBusiness()) {
                return new EJBTransactionRequiredException(e.getMessage()).initCause(getCause(e));
            } else if (interfaceType.isLocal()) {
                return new TransactionRequiredLocalException(e.getMessage()).initCause(getCause(e));
            } else {
                return e;
            }
        }
        if (e instanceof TransactionRolledbackException) {
View Full Code Here

                container.preInvokeNoTx(inv);
                break;
               
            case Container.TX_MANDATORY:
                if ( isNullTx || status == Status.STATUS_NO_TRANSACTION ) {
                    throw new TransactionRequiredLocalException();
                }
               
                useClientTx(prevTx, inv);
                break;
               
            case Container.TX_REQUIRED:
                if ( isNullTx ) {
                    throw new TransactionRequiredLocalException();
                }
               
                if ( status == Status.STATUS_NO_TRANSACTION ) {
                    inv.clientTx = null;
                    startNewTx(prevTx, inv);
                } else { // There is a client Tx
                    inv.clientTx = transactionManager.getTransaction();
                    useClientTx(prevTx, inv);
                }
                break;
               
            case Container.TX_REQUIRES_NEW:
                if ( status != Status.STATUS_NO_TRANSACTION ) {
                    inv.clientTx = transactionManager.suspend();
                }
                startNewTx(prevTx, inv);
                break;
               
            case Container.TX_SUPPORTS:
                if ( isNullTx ) {
                    throw new TransactionRequiredLocalException();
                }
               
                if ( status != Status.STATUS_NO_TRANSACTION ) {
                    useClientTx(prevTx, inv);
                } else { // we need to invoke the EJB with no Tx.
View Full Code Here

TOP

Related Classes of javax.ejb.TransactionRequiredLocalException

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.