@Override public Object processInvocation(final InterceptorContext context) throws Exception { try { return context.proceed(); } catch (EJBTransactionRequiredException e) { // this exception explicitly forbids initializing a cause throw copyStackTrace(new TransactionRequiredException(e.getMessage()), e); } catch (EJBTransactionRolledbackException e) { // this exception explicitly forbids initializing a cause throw copyStackTrace(new TransactionRolledbackException(e.getMessage()), e); } catch (NoSuchEJBException e) { // this exception explicitly forbids initializing a cause throw copyStackTrace(new NoSuchObjectException(e.getMessage()), e); } catch (NoSuchEntityException e) { // this exception explicitly forbids initializing a cause throw copyStackTrace(new NoSuchObjectException(e.getMessage()), e); } catch (EJBException e) { //as the create exception is not propagated the init method interceptor just stashes it in a ThreadLocal CreateException createException = popCreateException(); if (createException != null) { throw createException; } throw new RemoteException("Invocation failed", e); } } });
@Override public Object processInvocation(final InterceptorContext context) throws Exception { try { return context.proceed(); } catch (EJBTransactionRequiredException e) { throw copyStackTrace(copyCause(new TransactionRequiredLocalException(e.getMessage()), e), e); } catch (EJBTransactionRolledbackException e) { throw copyStackTrace(new TransactionRolledbackLocalException(e.getMessage(), e), e); } catch (NoSuchEJBException e) { throw copyStackTrace(new NoSuchObjectLocalException(e.getMessage(), e), e); } catch (NoSuchEntityException e) { throw copyStackTrace(new NoSuchObjectLocalException(e.getMessage(), e), e); } catch (EJBException e) { CreateException createException = popCreateException(); if (createException != null) { throw createException; } throw e; } } });
|| EJBLocalHome.class.isAssignableFrom(actualInvokingClass)) t = new NoSuchObjectLocalException(original.getMessage()); || EJBHome.class.isAssignableFrom(actualInvokingClass)) t = new NoSuchObjectException(original.getMessage());
throw new NoSuchObjectLocalException(e.getMessage(), e);
@Override public Object processInvocation(final InterceptorContext context) throws Exception { 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) { //as the create exception is not propagated the init method interceptor just stashes it in a ThreadLocal CreateException createException = popCreateException(); if (createException != null) { throw createException; } throw new RemoteException("Invocation failed", e); } } });
@Override public Object processInvocation(final InterceptorContext context) throws Exception { try { return context.proceed(); } catch (EJBTransactionRequiredException e) { throw new TransactionRequiredLocalException(e.getMessage()); } catch (EJBTransactionRolledbackException e) { throw new TransactionRolledbackLocalException(e.getMessage(), // AS7-5432: propagate the causing exception to the caller // (RuntimeExceptions thrown from the EJB-code arrive here as cause of // EJBTransactionRolledbackException - see org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(...)) e.getCausedByException()); } catch (NoSuchEJBException e) { throw new NoSuchObjectLocalException(e.getMessage(), // AS7-5432: propagate the causing exception to the caller e.getCausedByException()); } catch (NoSuchEntityException e) { throw new NoSuchObjectLocalException(e.getMessage(), // AS7-5432: propagate the causing exception to the caller e.getCausedByException()); } catch (EJBException e) { CreateException createException = popCreateException(); if (createException != null) { throw createException; } throw e; } } });