Package javax.transaction

Examples of javax.transaction.TransactionRolledbackException


        return delegate.wrapException(obj);
    }

    public RemoteException mapSystemException(SystemException ex) {
        if (ex instanceof TRANSACTION_ROLLEDBACK) {
            TransactionRolledbackException transactionRolledbackException = new TransactionRolledbackException(ex.getMessage());
            transactionRolledbackException.detail = ex;
            return transactionRolledbackException;
        }
        if (ex instanceof TRANSACTION_REQUIRED) {
            TransactionRequiredException transactionRequiredException = new TransactionRequiredException(ex.getMessage());
View Full Code Here


        return delegate.wrapException(obj);
    }

    public RemoteException mapSystemException(SystemException ex) {
        if (ex instanceof TRANSACTION_ROLLEDBACK) {
            TransactionRolledbackException transactionRolledbackException = new TransactionRolledbackException(ex.getMessage());
            transactionRolledbackException.detail = ex;
            return transactionRolledbackException;
        }
        if (ex instanceof TRANSACTION_REQUIRED) {
            TransactionRequiredException transactionRequiredException = new TransactionRequiredException(ex.getMessage());
View Full Code Here

        return delegate.wrapException(obj);
    }

    public RemoteException mapSystemException(SystemException ex) {
        if (ex instanceof TRANSACTION_ROLLEDBACK) {
            TransactionRolledbackException transactionRolledbackException = new TransactionRolledbackException(ex.getMessage());
            transactionRolledbackException.detail = ex;
            return transactionRolledbackException;
        }
        if (ex instanceof TRANSACTION_REQUIRED) {
            TransactionRequiredException transactionRequiredException = new TransactionRequiredException(ex.getMessage());
View Full Code Here

                try {
                    return context.proceed();
                } catch (EJBTransactionRequiredException e) {
                    throw new TransactionRequiredException(e.getMessage());
                } catch (EJBTransactionRolledbackException e) {
                    throw new TransactionRolledbackException(e.getMessage());
                } catch (NoSuchEJBException e) {
                    throw new NoSuchObjectException(e.getMessage());
                } catch (NoSuchEntityException e) {
                    throw new NoSuchObjectException(e.getMessage());
                } catch (EJBException e) {
View Full Code Here

        } else if (ex instanceof TRANSACTION_REQUIRED) {
            RemoteException newEx = new TransactionRequiredException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_ROLLEDBACK) {
            RemoteException newEx = new TransactionRolledbackException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof INVALID_TRANSACTION) {
            RemoteException newEx = new InvalidTransactionException(message);
            newEx.detail = ex;
View Full Code Here

 
  public void testCorrectHandlerUsedForSubclass() throws Throwable {
    MyThrowsHandler th = new MyThrowsHandler();
    ThrowsAdviceInterceptor ti = new ThrowsAdviceInterceptor(th);
    // Extends RemoteException
    TransactionRolledbackException ex = new TransactionRolledbackException();
    MockControl mc = MockControl.createControl(MethodInvocation.class);
    MethodInvocation mi = (MethodInvocation) mc.getMock();
    mi.proceed();
    mc.setThrowable(ex);
    mc.replay();
View Full Code Here

        throw t;
      }
    };
    ThrowsAdviceInterceptor ti = new ThrowsAdviceInterceptor(th);
    // Extends RemoteException
    TransactionRolledbackException ex = new TransactionRolledbackException();
    MockControl mc = MockControl.createControl(MethodInvocation.class);
    MethodInvocation mi = (MethodInvocation) mc.getMock();
    mi.proceed();
    mc.setThrowable(ex);
    mc.replay();
View Full Code Here

        String[] theFinalStates1 = init1;

        Exception[] theExceptions = { null, null, null, null, null, null, null,
                null };

        TransactionRolledbackException aTransactionRolledbackException;
        int loopCount = init1.length;
        for (int i = 0; i < loopCount; i++) {
            try {
                aTransactionRolledbackException = new TransactionRolledbackException(
                        init1[i]);
                if (theExceptions[i] != null) {
                    fail();
                }
                assertEquals(i + "  Final state mismatch",
                        aTransactionRolledbackException.getMessage(),
                        theFinalStates1[i]);

            } catch (Exception e) {
                if (theExceptions[i] == null) {
                    fail(i + "Unexpected exception");
View Full Code Here

        String[] theFinalStates1 = { null };

        Exception[] theExceptions = { null };

        TransactionRolledbackException aTransactionRolledbackException;
        int loopCount = 1;
        for (int i = 0; i < loopCount; i++) {
            try {
                aTransactionRolledbackException = new TransactionRolledbackException();
                if (theExceptions[i] != null) {
                    fail();
                }
                assertEquals(i + "  Final state mismatch",
                        aTransactionRolledbackException.getMessage(),
                        theFinalStates1[i]);

            } catch (Exception e) {
                if (theExceptions[i] == null) {
                    fail(i + "Unexpected exception");
View Full Code Here

        } else if (ex instanceof TRANSACTION_REQUIRED) {
            RemoteException newEx = new TransactionRequiredException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_ROLLEDBACK) {
            RemoteException newEx = new TransactionRolledbackException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof INVALID_TRANSACTION) {
            RemoteException newEx = new InvalidTransactionException(message);
            newEx.detail = ex;
View Full Code Here

TOP

Related Classes of javax.transaction.TransactionRolledbackException

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.