@Override public final NoSuchEJBException couldNotFindEjb(final String sessionId) { final NoSuchEJBException result = new NoSuchEJBException(String.format(getLoggingLocale(), couldNotFindEjb$str(), sessionId)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String componentNotSetInInterceptor = "WFLYEJB0169: Component not set in InterceptorContext: %s";
@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); } } });
final NodeInformation nodeInformation = discoveredNodeRegistry.getNodeInformation(getChannel().getConnection().getRemoteEndpointName()); nodeInformation.removeModule(EJBClientChannel.this, moduleIdentifier); receiverInvocationContext.requestFailed(new NoSuchEJBException(message + " @ " + getChannel().getConnection().getPeerURI()), getRetryExecutor()); } catch (IOException e) { receiverInvocationContext.requestFailed(new EJBException("Failed to read 'No such EJB' response", e), getRetryExecutor());
throw new ApplicationException(new NoSuchEJBException("Singleton initialization interrupted").initCause(e)); } catch (final ExecutionException e) { final Throwable throwable = e.getCause(); throw new ApplicationException(new NoSuchEJBException("Singleton initialization failed").initCause(e.getCause()));
@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; } } });
throw new NoSuchEJBException(message + " @ " + getChannel().getConnection().getPeerURI());
throw new ApplicationException(new NoSuchEJBException("Singleton initialization interrupted").initCause(e)); } catch (ExecutionException e) { Throwable throwable = e.getCause(); throw new ApplicationException(new NoSuchEJBException("Singleton initialization failed").initCause(e.getCause()));
@Override public final NoSuchEJBException unknownDeployment(final org.jboss.ejb.client.EJBLocator<?> locator) { final NoSuchEJBException result = new NoSuchEJBException(String.format(getLoggingLocale(), unknownDeployment$str(), locator)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String ejbNotFoundInDeployment = "WFLYEJB0056: Could not find EJB in matching deployment: %s";
/** * Finds the remote bean by its key. * * @param key the remote key * * @return the remote interface of the entity. */ @Override public AbstractContext<X> getContext(Object key, boolean forceLoad) throws FinderException { throw new NoSuchEJBException("no matching object:" + key); /* if (key == null) return null; StatefulContext cxt = _sessions.get(key); // ejb/0fe4 if (cxt == null) throw new NoSuchEJBException("no matching object:" + key); // XXX ejb/0fe-: needs refactoring of 2.1/3.0 interfaces. // throw new FinderException("no matching object:" + key); return cxt; */ }
throw new ApplicationException(new NoSuchEJBException("Singleton initialization interrupted").initCause(e)); } catch (final ExecutionException e) { final Throwable throwable = e.getCause(); throw new ApplicationException(new NoSuchEJBException("Singleton initialization failed").initCause(e.getCause()));
@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; } } });
@Override public final NoSuchEJBException noEJBReceiverAvailable(final URI locator) { final NoSuchEJBException result = new NoSuchEJBException(String.format(getLoggingLocale(), noEJBReceiverAvailable$str(), locator)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String noEJBReceiverForNode = "EJBCLIENT000027: No EJBReceiver available for node name %s";
/** * Finds the remote bean by its key. * * @param key * the remote key * * @return the remote interface of the entity. */ @Override public AbstractContext getContext(Object key, boolean forceLoad) throws FinderException { throw new NoSuchEJBException("no matching object:" + key); /* * if (key == null) return null; * * StatefulContext cxt = _sessions.get(key); * * // ejb/0fe4 if (cxt == null) throw new * NoSuchEJBException("no matching object:" + key); // XXX ejb/0fe-: needs * refactoring of 2.1/3.0 interfaces. // throw new * FinderException("no matching object:" + key); * * return cxt; */ }
return e; } else { return new NoSuchEJBException(e.getMessage()).initCause(getCause(e));
|| EJBLocalHome.class.isAssignableFrom(actualInvokingClass)) t = new NoSuchObjectLocalException(original.getMessage()); || EJBHome.class.isAssignableFrom(actualInvokingClass)) t = new NoSuchObjectException(original.getMessage());
@Override public final NoSuchEJBException noTransportProvider(final org.jboss.ejb.client.EJBLocator<?> locator, final String scheme) { final NoSuchEJBException result = new NoSuchEJBException(String.format(getLoggingLocale(), noTransportProvider$str(), locator, scheme)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String selectorReturnedUnknownNode = "EJBCLIENT000076: Configured selector \"%s\" returned unknown node \"%s\"";
public void remove(Object key) { StatefulBeanContext ctx = null; synchronized (cacheMap) { ctx = (StatefulBeanContext) cacheMap.remove(key); } if(ctx == null) throw new NoSuchEJBException("Could not find Stateful bean: " + key); container.destroy(ctx); ++removeCount; }
return e; } else { return new NoSuchEJBException(e.getMessage()).initCause(getCause(e));
throw new NoSuchObjectLocalException(e.getMessage(), e);
@Override public final NoSuchEJBException noDestinationEstablished(final org.jboss.ejb.client.EJBLocator<?> locator) { final NoSuchEJBException result = new NoSuchEJBException(String.format(getLoggingLocale(), noDestinationEstablished$str(), locator)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String requestNotSent = "EJBCLIENT000080: Request not sent";