org.jboss.ejb3.session
Class SessionSpecContainer

java.lang.Object
  extended by org.jboss.ejb3.EJBContainer
      extended by org.jboss.ejb3.TimerServiceContainer
          extended by org.jboss.ejb3.session.SessionContainer
              extended by org.jboss.ejb3.session.SessionSpecContainer
All Implemented Interfaces:
org.jboss.ejb3.async.spi.AsyncCancellableContext, org.jboss.ejb3.async.spi.AsyncEndpoint, Container, org.jboss.ejb3.context.spi.BeanManager, org.jboss.ejb3.context.spi.SessionBeanManager, org.jboss.ejb3.endpoint.Endpoint, org.jboss.ejb3.interceptors.direct.IndirectContainer<EJBContainer,org.jboss.ejb3.interceptors.direct.DirectContainer<EJBContainer>>, JavaEEComponent, org.jboss.ejb3.proxy.spi.container.InvokableContext, EJBInjectionContainer, ExtendedInjectionContainer, InjectionContainer
Direct Known Subclasses:
StatefulContainer, StatelessContainer

public abstract class SessionSpecContainer
extends SessionContainer
implements org.jboss.ejb3.proxy.spi.container.InvokableContext, org.jboss.ejb3.async.spi.AsyncEndpoint

SessionSpecContainer A SessionContainer with support for Session Beans defined specifically by the EJB3 Specification


Field Summary
 
Fields inherited from class org.jboss.ejb3.session.SessionContainer
proxyDeployer
 
Fields inherited from class org.jboss.ejb3.TimerServiceContainer
timerService
 
Fields inherited from class org.jboss.ejb3.EJBContainer
assembly, beanClassName, classloader, ejbName, enc, encFactory, encInjections, encInjectors, ENTITY_MANAGER_FACTORY, initialContextProperties, injectors, invokeStats, MANAGED_ENTITY_MANAGER_FACTORY, metadataBasedAnnotationRepo, objectName, pool, reinitialize, xml
 
Fields inherited from interface org.jboss.ejb3.Container
ENC_CTX_NAME
 
Constructor Summary
SessionSpecContainer(java.lang.ClassLoader cl, java.lang.String beanClassName, java.lang.String ejbName, org.jboss.aop.Domain domain, java.util.Hashtable ctxProperties, Ejb3Deployment deployment, org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData beanMetaData, java.util.concurrent.ExecutorService asynchronousExecutor)
           
SessionSpecContainer(java.lang.ClassLoader cl, java.lang.String beanClassName, java.lang.String ejbName, org.jboss.aop.Domain domain, java.util.Hashtable ctxProperties, org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData beanMetaData, java.util.concurrent.ExecutorService asynchronousExecutor)
           
 
Method Summary
 boolean cancel(org.jboss.ejb3.async.spi.AsyncInvocationId id)
          
 java.util.concurrent.ExecutorService getAsynchronousExecutor()
          Returns the ExecutorService used in processing Asynchronous invocations
protected  java.util.Set<java.lang.Class<?>> getBusinessInterfaces()
          Returns the busines interfaces for this EJB
protected  BusinessObjectFactory getBusinessObjectFactory()
           
 org.jboss.ejb3.async.spi.AsyncInvocationMap getCurrentAsyncInvocations()
           
 java.lang.Object invoke(java.lang.Object proxy, org.jboss.ejb3.common.lang.SerializableMethod method, java.lang.Object[] args)
          Invokes the method described by the specified serializable method as called from the specified proxy, using the specified arguments
 java.lang.Object invoke(java.io.Serializable session, java.lang.Class<?> invokedBusinessInterface, java.lang.reflect.Method method, java.lang.Object[] args)
          Invokes the specified method upon the specified session, passing the specified arguments.
 java.lang.Object invoke(java.io.Serializable session, org.jboss.ejb3.common.lang.SerializableMethod method, java.lang.Object[] args)
          Deprecated. 
 java.lang.Object invokeAsync(java.io.Serializable session, java.lang.Class<?> invokedBusinessInterface, java.lang.reflect.Method method, java.lang.Object[] args)
          
protected  java.lang.Object invokeHomeCreate(java.lang.reflect.Method method, java.lang.Object[] args)
          Provides implementation for this bean's EJB 2.1 Home.create() method
protected  boolean isEJBObjectMethod(java.lang.reflect.Method method)
          Deprecated. Use isEjbObjectMethod(SerializableMethod method)
protected  boolean isEjbObjectMethod(org.jboss.ejb3.common.lang.SerializableMethod method)
          Determines whether the specified method is an EJB2.x Local or Remote Method
protected  boolean isHandleMethod(java.lang.reflect.Method method)
          Deprecated. Use isHandleMethod(SerializableMethod method)
protected  boolean isHandleMethod(org.jboss.ejb3.common.lang.SerializableMethod method)
          Determines if the specified Method is a Handle Method
protected  boolean isHomeMethod(java.lang.reflect.Method method)
          Deprecated. Use isHomeMethod(SerializableMethod method) in SessionSpecContainer
protected  boolean isHomeMethod(org.jboss.ejb3.common.lang.SerializableMethod method)
          Determines whether the specified method is an EJB2.x Home Method
protected  void lockedStart()
          Lifecycle Start
protected  void lockedStop()
          Lifecycle Stop
 void setBusinessObjectFactory(BusinessObjectFactory factory)
           
 void setCurrentAsyncInvocations(org.jboss.ejb3.async.spi.AsyncInvocationMap currentAsyncInvocations)
           
protected  void verifyBusinessObjectFactory()
           
 
Methods inherited from class org.jboss.ejb3.session.SessionContainer
constructProperNoSuchEjbException, createSession, createSession, destroySession, dynamicInvoke, getBusinessObject, getClusterFamilies, getEJBLocalObject, getEJBObject, getJndiRegistrar, getJndiRegistrarBindName, getMetaData, getProxyFactory, getProxyFactory, getProxyFactory, getRemoteBinding, getSessionFactory, getVirtualMethods, hasJNDIBinding, instantiated, invoke, invokeEJBObjectMethod, invokeSetSessionContext, isSessionAware, localHomeInvoke, localInvoke, marshallException, marshallResponse, populateInvocation, registerWithAopDispatcher, removeHandle, resolveBusinessInterfaces, setJndiRegistrar
 
Methods inherited from class org.jboss.ejb3.TimerServiceContainer
afterStart, create, getTimedObjectInvoker, getTimerService, getTimerService, setTimerServiceFactory
 
Methods inherited from class org.jboss.ejb3.EJBContainer
canResolveEJB, checkForDuplicateLocalAndRemoteInterfaces, construct, createBeanContext, createInterceptor, createObjectName, createObjectName, destroy, destroyBeanContext, findPartitionName, getAdvisor, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotations, getApplicationException, getAssemblyDescriptor, getBeanClass, getBeanClassName, getBeanContainer, getBeanInstantiator, getBusinessAndComponentInterfaces, getBusinessObject, getCachedConnectionManager, getClassloader, getClazz, getDependencyPolicy, getDeployment, getDeploymentDescriptorType, getDeploymentPropertyListString, getDeploymentQualifiedName, getDeploymentUnit, getEffigy, getEJBContainer, getEJBHome, getEjbJndiName, getEjbJndiName, getEJBLocalHome, getEjbName, getEnc, getEncInjections, getEncInjectors, getEnvironmentRefGroup, getHandledCallbacks, getIdentifier, getInitialContext, getInitialContextProperties, getInjectionHandlers, getInjectors, getInterceptorClasses, getInterceptorInjectors, getInterceptorRepository, getInterceptors, getInvocationLock, getInvokedBusinessInterface, getInvokedInterface, getInvokeStats, getJaccContextId, getMetaDataBasedAnnotationRepository, getMethodInfo, getModule, getName, getNonBridgeMethod, getObjectName, getPartitionName, getPool, getRollbackOnly, getRootFile, getSecurityManager, getTimeoutCallback, getUserTransaction, getXml, initializePool, initMetaDataBasedAnnotationRepository, injectBeanContext, invokeCallback, invokePostActivate, invokePostConstruct, invokePostConstruct, invokePreDestroy, invokePrePassivate, isAnnotationPresent, isBusinessMethod, isCallerInRole, isClustered, lookup, peekContext, popContext, popEnc, processMetadata, pushContext, pushEnc, reinitialize, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveEJB, resolveEjbContainer, resolveEjbContainer, resolveInjectors, resolveMessageDestination, resolvePersistenceUnitSupplier, setAssemblyDescriptor, setBeanInstantiator, setCachedConnectionManager, setDirectContainer, setEjbEncFactory, setInjectionManager, setJaccContextId, setRollbackOnly, setTransactionManager, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb3.proxy.spi.container.InvokableContext
dynamicInvoke
 
Methods inherited from interface org.jboss.ejb3.context.spi.BeanManager
getEJBHome, getEJBLocalHome, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, lookup, setRollbackOnly
 
Methods inherited from interface org.jboss.ejb3.Container
getMBean
 

Constructor Detail

SessionSpecContainer

public SessionSpecContainer(java.lang.ClassLoader cl,
                            java.lang.String beanClassName,
                            java.lang.String ejbName,
                            org.jboss.aop.Domain domain,
                            java.util.Hashtable ctxProperties,
                            Ejb3Deployment deployment,
                            org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData beanMetaData,
                            java.util.concurrent.ExecutorService asynchronousExecutor)
                     throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

SessionSpecContainer

public SessionSpecContainer(java.lang.ClassLoader cl,
                            java.lang.String beanClassName,
                            java.lang.String ejbName,
                            org.jboss.aop.Domain domain,
                            java.util.Hashtable ctxProperties,
                            org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData beanMetaData,
                            java.util.concurrent.ExecutorService asynchronousExecutor)
                     throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException
Method Detail

invoke

public java.lang.Object invoke(java.io.Serializable session,
                               java.lang.Class<?> invokedBusinessInterface,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invokes the specified method upon the specified session, passing the specified arguments. This is required by the Endpoint interface and is the correct implementation of the ejb3-core containers looking forward.

Specified by:
invoke in interface org.jboss.ejb3.endpoint.Endpoint
Parameters:
session -
invokedBusinessInterface -
method -
args -
Throws:
java.lang.Throwable
See Also:
Endpoint.invoke(java.io.Serializable, java.lang.Class, java.lang.reflect.Method, java.lang.Object[])

invokeAsync

public java.lang.Object invokeAsync(java.io.Serializable session,
                                    java.lang.Class<?> invokedBusinessInterface,
                                    java.lang.reflect.Method method,
                                    java.lang.Object[] args)
                             throws java.lang.Throwable

Specified by:
invokeAsync in interface org.jboss.ejb3.async.spi.AsyncEndpoint
Throws:
java.lang.Throwable
See Also:
AsyncEndpoint.invokeAsync(java.io.Serializable, java.lang.Class, java.lang.reflect.Method, java.lang.Object[])

invoke

@Deprecated
public java.lang.Object invoke(java.io.Serializable session,
                                          org.jboss.ejb3.common.lang.SerializableMethod method,
                                          java.lang.Object[] args)
                        throws java.lang.Throwable
Deprecated. 

A transition method in moving from InvokableContext.invoke to Endpoint.invoke. Invokes the specified method upon the specified session, passing the specified arguments

Parameters:
session -
method -
args -
Returns:
Throws:
java.lang.Throwable

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               org.jboss.ejb3.common.lang.SerializableMethod method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invokes the method described by the specified serializable method as called from the specified proxy, using the specified arguments

Specified by:
invoke in interface org.jboss.ejb3.proxy.spi.container.InvokableContext
Parameters:
proxy - The proxy making the invocation
method - The method to be invoked
args - The arguments to the invocation
Returns:
Throws:
java.lang.Throwable - A possible exception thrown by the invocation

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)

invokeHomeCreate

protected java.lang.Object invokeHomeCreate(java.lang.reflect.Method method,
                                            java.lang.Object[] args)
                                     throws java.lang.Exception
Provides implementation for this bean's EJB 2.1 Home.create() method

Parameters:
factory -
unadvisedMethod -
args -
Returns:
Throws:
java.lang.Exception

isHomeMethod

@Deprecated
protected boolean isHomeMethod(java.lang.reflect.Method method)
Deprecated. Use isHomeMethod(SerializableMethod method) in SessionSpecContainer


isHomeMethod

protected boolean isHomeMethod(org.jboss.ejb3.common.lang.SerializableMethod method)
Determines whether the specified method is an EJB2.x Home Method

Parameters:
method -
Returns:

isEJBObjectMethod

@Deprecated
protected boolean isEJBObjectMethod(java.lang.reflect.Method method)
Deprecated. Use isEjbObjectMethod(SerializableMethod method)

Parameters:
method -
Returns:

isEjbObjectMethod

protected boolean isEjbObjectMethod(org.jboss.ejb3.common.lang.SerializableMethod method)
Determines whether the specified method is an EJB2.x Local or Remote Method

Parameters:
method -
Returns:

isHandleMethod

@Deprecated
protected boolean isHandleMethod(java.lang.reflect.Method method)
Deprecated. Use isHandleMethod(SerializableMethod method)

Parameters:
method -
Returns:

isHandleMethod

protected boolean isHandleMethod(org.jboss.ejb3.common.lang.SerializableMethod method)
Determines if the specified Method is a Handle Method

Parameters:
method -
Returns:

getBusinessInterfaces

protected java.util.Set<java.lang.Class<?>> getBusinessInterfaces()
Returns the busines interfaces for this EJB

Returns:

getBusinessObjectFactory

protected BusinessObjectFactory getBusinessObjectFactory()

lockedStart

protected void lockedStart()
                    throws java.lang.Exception
Lifecycle Start

Overrides:
lockedStart in class SessionContainer
Throws:
java.lang.Exception

lockedStop

protected void lockedStop()
                   throws java.lang.Exception
Lifecycle Stop

Overrides:
lockedStop in class SessionContainer
Throws:
java.lang.Exception
See Also:
EJBContainer.lockedStop()

getAsynchronousExecutor

public java.util.concurrent.ExecutorService getAsynchronousExecutor()
Returns the ExecutorService used in processing Asynchronous invocations


setBusinessObjectFactory

public void setBusinessObjectFactory(BusinessObjectFactory factory)

verifyBusinessObjectFactory

protected void verifyBusinessObjectFactory()

getCurrentAsyncInvocations

public org.jboss.ejb3.async.spi.AsyncInvocationMap getCurrentAsyncInvocations()

setCurrentAsyncInvocations

public void setCurrentAsyncInvocations(org.jboss.ejb3.async.spi.AsyncInvocationMap currentAsyncInvocations)