org.jboss.ejb3.core.context
Class SessionInvocationContextAdapter

java.lang.Object
  extended by org.jboss.ejb3.context.base.BaseInvocationContext
      extended by org.jboss.ejb3.context.base.BaseSessionInvocationContext
          extended by org.jboss.ejb3.core.context.SessionInvocationContextAdapter
All Implemented Interfaces:
javax.ejb.EJBContext, javax.ejb.SessionContext, javax.interceptor.InvocationContext, org.jboss.ejb3.async.spi.AsyncCancellableContext, org.jboss.ejb3.async.spi.AsyncInvocationContext, org.jboss.ejb3.context.spi.SessionInvocationContext, org.jboss.ejb3.tx2.spi.TransactionalInvocationContext

public class SessionInvocationContextAdapter
extends org.jboss.ejb3.context.base.BaseSessionInvocationContext
implements org.jboss.ejb3.tx2.spi.TransactionalInvocationContext, org.jboss.ejb3.async.spi.AsyncInvocationContext, org.jboss.ejb3.async.spi.AsyncCancellableContext


Constructor Summary
SessionInvocationContextAdapter(java.lang.Class<?> invokedBusinessInterface, org.jboss.aop.joinpoint.MethodInvocation delegate, java.util.concurrent.ExecutorService asyncExecutor, org.jboss.ejb3.async.spi.AsyncCancellableContext container)
          Creates a new instance
 
Method Summary
 boolean cancel(org.jboss.ejb3.async.spi.AsyncInvocationId id)
          
 javax.ejb.ApplicationException getApplicationException(java.lang.Class<?> e)
           
 java.util.concurrent.ExecutorService getAsynchronousExecutor()
          
 javax.ejb.TransactionAttributeType getTransactionAttribute()
           
 int getTransactionTimeout()
           
 java.lang.Object proceed()
           
 void setParameters(java.lang.Object[] params)
           
 
Methods inherited from class org.jboss.ejb3.context.base.BaseSessionInvocationContext
getBusinessObject, getEJBContext, getEJBLocalObject, getEJBObject, getInvokedBusinessInterface, getManager, getMessageContext, setFuture, setMessageContext, wasCancelCalled
 
Methods inherited from class org.jboss.ejb3.context.base.BaseInvocationContext
getCallerIdentity, getCallerPrincipal, getContextData, getEJBHome, getEJBLocalHome, getEnvironment, getMethod, getParameters, getRollbackOnly, getTarget, getTimer, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setCallerPrincipal, setEJBContext, setMethod, setRollbackOnly, setTimer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb3.context.spi.InvocationContext
getEJBContext, getTimer, setCallerPrincipal, setEJBContext, setTimer
 
Methods inherited from interface javax.interceptor.InvocationContext
getContextData, getMethod, getParameters, getTarget
 
Methods inherited from interface org.jboss.ejb3.context.spi.EJBContext
getContextData, getManager, getTarget
 
Methods inherited from interface javax.ejb.EJBContext
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setRollbackOnly
 

Constructor Detail

SessionInvocationContextAdapter

public SessionInvocationContextAdapter(java.lang.Class<?> invokedBusinessInterface,
                                       org.jboss.aop.joinpoint.MethodInvocation delegate,
                                       java.util.concurrent.ExecutorService asyncExecutor,
                                       org.jboss.ejb3.async.spi.AsyncCancellableContext container)
Creates a new instance

Parameters:
invokedBusinessInterface -
delegate -
asyncExecutor - Used to dispatch asynchronous invocations; required
Method Detail

getApplicationException

public javax.ejb.ApplicationException getApplicationException(java.lang.Class<?> e)
Specified by:
getApplicationException in interface org.jboss.ejb3.tx2.spi.TransactionalInvocationContext

getTransactionAttribute

public javax.ejb.TransactionAttributeType getTransactionAttribute()
Specified by:
getTransactionAttribute in interface org.jboss.ejb3.tx2.spi.TransactionalInvocationContext

getTransactionTimeout

public int getTransactionTimeout()
Specified by:
getTransactionTimeout in interface org.jboss.ejb3.tx2.spi.TransactionalInvocationContext

proceed

public java.lang.Object proceed()
                         throws java.lang.Exception
Specified by:
proceed in interface javax.interceptor.InvocationContext
Specified by:
proceed in class org.jboss.ejb3.context.base.BaseInvocationContext
Throws:
java.lang.Exception

setParameters

public void setParameters(java.lang.Object[] params)
                   throws java.lang.IllegalArgumentException,
                          java.lang.IllegalStateException
Specified by:
setParameters in interface javax.interceptor.InvocationContext
Overrides:
setParameters in class org.jboss.ejb3.context.base.BaseInvocationContext
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

getAsynchronousExecutor

public java.util.concurrent.ExecutorService getAsynchronousExecutor()

Specified by:
getAsynchronousExecutor in interface org.jboss.ejb3.async.spi.AsyncInvocationContext
See Also:
AsyncInvocationContext.getAsynchronousExecutor()

cancel

public boolean cancel(org.jboss.ejb3.async.spi.AsyncInvocationId id)
               throws java.lang.IllegalArgumentException

Specified by:
cancel in interface org.jboss.ejb3.async.spi.AsyncCancellableContext
Throws:
java.lang.IllegalArgumentException
See Also:
AsyncCancellableContext.cancel(org.jboss.ejb3.async.spi.AsyncInvocationId)