@Override public ExecutorService getAsynchronousExecutor() { return super.getAsynchronousExecutor(); }
/** * Creates a {@link SessionContainerInvocation} * @param invokedBusinessInterface * @param info * @param container Used for dispatching asynchronous invocations */ public SessionContainerInvocation(Class<?> invokedBusinessInterface, MethodInfo info, final SessionSpecContainer container) { super(info); this.invocationContext = new SessionInvocationContextAdapter(invokedBusinessInterface, this, container.getAsynchronousExecutor(), container); this.container = container; this.info = info; this.invokedBusinessInterface = invokedBusinessInterface; }
/** * {@inheritDoc} * @see org.jboss.ejb3.async.spi.AsyncEndpoint#invokeAsync(java.io.Serializable, java.lang.Class, java.lang.reflect.Method, java.lang.Object[]) */ @Override public Object invokeAsync(final Serializable session, final Class<?> invokedBusinessInterface, final Method method, final Object[] args) throws Throwable { // Get the ES final ExecutorService es = this.getAsynchronousExecutor(); // Get the Security Context final SecurityContext sc = SecurityActions.getSecurityContext(); // Make a new ID for the invocation final AsyncInvocationId id = new AsyncInvocationIdUUIDImpl(); // Submit as async final Future<?> returnValue = es.submit(new AsyncInvocationTask<Object>(session,method,args, sc, id)); // Return return returnValue; }
invokedBusinessInterface, this.getAsynchronousExecutor(), this); nextInvocation.getMetaData().addMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION, SessionSpecRemotingMetadata.KEY_INVOKED_METHOD, method);