org.jboss.ejb3.stateless
Class StatelessContainer

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
                  extended by org.jboss.ejb3.stateless.StatelessContainer
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, org.jboss.ejb3.timerservice.spi.MultiTimeoutMethodTimedObjectInvoker, org.jboss.ejb3.timerservice.spi.TimedObjectInvoker, EJBInjectionContainer, ExtendedInjectionContainer, InjectionContainer, org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer

public class StatelessContainer
extends SessionSpecContainer
implements org.jboss.ejb3.timerservice.spi.MultiTimeoutMethodTimedObjectInvoker, org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer, org.jboss.ejb3.proxy.spi.container.InvokableContext

Comment


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
StatelessContainer(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)
           
 
Method Summary
 void callTimeout(javax.ejb.Timer timer)
          
 void callTimeout(javax.ejb.Timer timer, java.lang.reflect.Method tMethod)
          Invokes the passed timeout method for the passed Timer, on a bean instance.
 BeanContext<?> createBeanContext()
          Create a bean context for use in a pool.
 java.lang.Object createProxyLocalEjb21()
           
 java.lang.Object createProxyLocalEjb21(org.jboss.ejb3.annotation.LocalBinding binding)
          Create a local proxy (EJBLocalObject) for an enterprise bean with the specified LocalBinding
 java.lang.Object createProxyRemoteEjb21()
           
 java.lang.Object createProxyRemoteEjb21(org.jboss.ejb3.annotation.RemoteBinding binding)
           
 java.io.Serializable createSession(java.lang.Class<?>[] initTypes, java.lang.Object[] initArgs)
          Create session to an EJB bean.
 org.jboss.aop.joinpoint.InvocationResponse dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation)
          Remote Invocation entry point, as delegated from InvokableContextClassProxyHack (Remoting Dispatcher)
<T> T
getBusinessObject(BeanContext<?> ctx, java.lang.Class<T> intf)
           
 java.lang.String getContainerName()
           
protected  java.lang.String getJndiRegistrarBindName()
          Returns the name under which the JNDI Registrar for this container is bound
 java.lang.Object getMBean()
           
 java.lang.Class getServiceImplementationClass()
          WS integration
 java.lang.String getTimedObjectId()
           
protected  org.jboss.ejb3.timerservice.spi.TimedObjectInvoker getTimedObjectInvoker()
          Returns the TimedObjectInvoker which will be used by the timer implementations to invoke the timeout method (annotated with Timeout or specified in deployment descriptor) on the bean.
protected  java.lang.Object invokeEJBObjectMethod(org.jboss.aop.MethodInfo info, org.jboss.aop.joinpoint.MethodInvocation invocation)
           
 java.lang.Object invokeEndpoint(java.lang.reflect.Method method, java.lang.Object[] args, org.jboss.wsf.spi.invocation.integration.InvocationContextCallback invCtxCallback)
          WS Integration
protected  java.lang.Object invokeHomeMethod(org.jboss.aop.MethodInfo info, org.jboss.aop.joinpoint.MethodInvocation invocation)
           
 boolean isClustered()
           
 java.lang.Object localHomeInvoke(java.lang.reflect.Method method, java.lang.Object[] args)
           
 java.lang.Object localInvoke(java.lang.reflect.Method method, java.lang.Object[] args)
          Performs a synchronous local invocation
 java.lang.Object localInvoke(java.lang.reflect.Method method, java.lang.Object[] args, BeanContextLifecycleCallback<StatelessBeanContext> callback)
           
 java.lang.Object localInvoke(java.lang.Object id, java.lang.reflect.Method method, java.lang.Object[] args)
           
protected  void removeHandle(javax.ejb.Handle handle)
           
protected  void verifyBusinessObjectFactory()
           
 
Methods inherited from class org.jboss.ejb3.session.SessionSpecContainer
cancel, getAsynchronousExecutor, getBusinessInterfaces, getBusinessObjectFactory, getCurrentAsyncInvocations, invoke, invoke, invoke, invokeAsync, invokeHomeCreate, isEJBObjectMethod, isEjbObjectMethod, isHandleMethod, isHandleMethod, isHomeMethod, isHomeMethod, lockedStart, lockedStop, setBusinessObjectFactory, setCurrentAsyncInvocations
 
Methods inherited from class org.jboss.ejb3.session.SessionContainer
constructProperNoSuchEjbException, createSession, destroySession, getBusinessObject, getClusterFamilies, getEJBLocalObject, getEJBObject, getJndiRegistrar, getMetaData, getProxyFactory, getProxyFactory, getProxyFactory, getRemoteBinding, getSessionFactory, getVirtualMethods, hasJNDIBinding, instantiated, invoke, invokeEJBObjectMethod, invokeSetSessionContext, isSessionAware, marshallException, marshallResponse, populateInvocation, registerWithAopDispatcher, resolveBusinessInterfaces, setJndiRegistrar
 
Methods inherited from class org.jboss.ejb3.TimerServiceContainer
afterStart, create, getTimerService, getTimerService, setTimerServiceFactory
 
Methods inherited from class org.jboss.ejb3.EJBContainer
canResolveEJB, checkForDuplicateLocalAndRemoteInterfaces, construct, createInterceptor, createObjectName, createObjectName, destroy, destroyBeanContext, findPartitionName, getAdvisor, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotations, getApplicationException, getAssemblyDescriptor, getBeanClass, getBeanClassName, getBeanContainer, getBeanInstantiator, getBusinessAndComponentInterfaces, 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, 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
invoke
 
Methods inherited from interface org.jboss.ejb3.context.spi.BeanManager
getEJBHome, getEJBLocalHome, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, lookup, setRollbackOnly
 

Constructor Detail

StatelessContainer

public StatelessContainer(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
Method Detail

createBeanContext

public BeanContext<?> createBeanContext()
Description copied from interface: Container
Create a bean context for use in a pool.

Specified by:
createBeanContext in interface Container
Specified by:
createBeanContext in class EJBContainer
Returns:
a ready to use bean context

createProxyLocalEjb21

public java.lang.Object createProxyLocalEjb21()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

createProxyLocalEjb21

public java.lang.Object createProxyLocalEjb21(org.jboss.ejb3.annotation.LocalBinding binding)
                                       throws java.lang.Exception
Create a local proxy (EJBLocalObject) for an enterprise bean with the specified LocalBinding

Parameters:
id -
Returns:
Throws:
java.lang.Exception

createProxyRemoteEjb21

public java.lang.Object createProxyRemoteEjb21()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

createProxyRemoteEjb21

public java.lang.Object createProxyRemoteEjb21(org.jboss.ejb3.annotation.RemoteBinding binding)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

createSession

public java.io.Serializable createSession(java.lang.Class<?>[] initTypes,
                                          java.lang.Object[] initArgs)
Description copied from class: SessionContainer
Create session to an EJB bean.

Specified by:
createSession in class SessionContainer
Parameters:
initTypes - the parameter types used by the home's create method
initArgs - the arguments for the home's create method
Returns:
the identifier of the session

isClustered

public boolean isClustered()
Specified by:
isClustered in interface Container
Overrides:
isClustered in class EJBContainer

getMBean

public java.lang.Object getMBean()
Specified by:
getMBean in interface Container

callTimeout

public void callTimeout(javax.ejb.Timer timer)
                 throws java.lang.Exception

Specified by:
callTimeout in interface org.jboss.ejb3.timerservice.spi.TimedObjectInvoker
Throws:
java.lang.Exception

localInvoke

public java.lang.Object localInvoke(java.lang.reflect.Method method,
                                    java.lang.Object[] args)
                             throws java.lang.Throwable
Performs a synchronous local invocation

Throws:
java.lang.Throwable

localInvoke

public java.lang.Object localInvoke(java.lang.Object id,
                                    java.lang.reflect.Method method,
                                    java.lang.Object[] args)
                             throws java.lang.Throwable
Specified by:
localInvoke in class SessionContainer
Throws:
java.lang.Throwable

localInvoke

public java.lang.Object localInvoke(java.lang.reflect.Method method,
                                    java.lang.Object[] args,
                                    BeanContextLifecycleCallback<StatelessBeanContext> callback)
                             throws java.lang.Throwable
Throws:
java.lang.Throwable

dynamicInvoke

public org.jboss.aop.joinpoint.InvocationResponse dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation)
                                                         throws java.lang.Throwable
Remote Invocation entry point, as delegated from InvokableContextClassProxyHack (Remoting Dispatcher)

Specified by:
dynamicInvoke in interface org.jboss.ejb3.proxy.spi.container.InvokableContext
Specified by:
dynamicInvoke in class SessionContainer
Throws:
java.lang.Throwable

invokeEJBObjectMethod

protected java.lang.Object invokeEJBObjectMethod(org.jboss.aop.MethodInfo info,
                                                 org.jboss.aop.joinpoint.MethodInvocation invocation)
                                          throws java.lang.Throwable
Throws:
java.lang.Throwable

localHomeInvoke

public java.lang.Object localHomeInvoke(java.lang.reflect.Method method,
                                        java.lang.Object[] args)
                                 throws java.lang.Throwable
Specified by:
localHomeInvoke in class SessionContainer
Throws:
java.lang.Throwable

invokeHomeMethod

protected java.lang.Object invokeHomeMethod(org.jboss.aop.MethodInfo info,
                                            org.jboss.aop.joinpoint.MethodInvocation invocation)
                                     throws java.lang.Throwable
Throws:
java.lang.Throwable

getBusinessObject

public <T> T getBusinessObject(BeanContext<?> ctx,
                               java.lang.Class<T> intf)
Overrides:
getBusinessObject in class EJBContainer

removeHandle

protected void removeHandle(javax.ejb.Handle handle)
Specified by:
removeHandle in class SessionContainer

getServiceImplementationClass

public java.lang.Class getServiceImplementationClass()
WS integration

Specified by:
getServiceImplementationClass in interface org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer
Returns:

invokeEndpoint

public java.lang.Object invokeEndpoint(java.lang.reflect.Method method,
                                       java.lang.Object[] args,
                                       org.jboss.wsf.spi.invocation.integration.InvocationContextCallback invCtxCallback)
                                throws java.lang.Throwable
WS Integration

Specified by:
invokeEndpoint in interface org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer
Parameters:
method -
args -
invCtxCallback -
Returns:
Throws:
java.lang.Throwable

getContainerName

public java.lang.String getContainerName()
Specified by:
getContainerName in interface org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer

getJndiRegistrarBindName

protected java.lang.String getJndiRegistrarBindName()
Returns the name under which the JNDI Registrar for this container is bound

Specified by:
getJndiRegistrarBindName in class SessionContainer
Returns:

getTimedObjectId

public java.lang.String getTimedObjectId()
Specified by:
getTimedObjectId in interface org.jboss.ejb3.timerservice.spi.TimedObjectInvoker
See Also:
TimedObjectInvoker.getTimedObjectId()

getTimedObjectInvoker

protected org.jboss.ejb3.timerservice.spi.TimedObjectInvoker getTimedObjectInvoker()
Description copied from class: TimerServiceContainer
Returns the TimedObjectInvoker which will be used by the timer implementations to invoke the timeout method (annotated with Timeout or specified in deployment descriptor) on the bean.

Specified by:
getTimedObjectInvoker in class TimerServiceContainer
Returns:

callTimeout

public void callTimeout(javax.ejb.Timer timer,
                        java.lang.reflect.Method tMethod)
                 throws java.lang.Exception
Invokes the passed timeout method for the passed Timer, on a bean instance.

Specified by:
callTimeout in interface org.jboss.ejb3.timerservice.spi.MultiTimeoutMethodTimedObjectInvoker
Parameters:
timer - The Timer for which the timeout has occurred
tMethod - The timeout method
Throws:
java.lang.Exception - If any exception occurs during invocation of timeout method on the target bean
{@link - NullPointerException} If the passed tMethod is null

verifyBusinessObjectFactory

protected void verifyBusinessObjectFactory()
Overrides:
verifyBusinessObjectFactory in class SessionSpecContainer