com.caucho.ejb.session
Class StatelessManager<X>

java.lang.Object
  extended by com.caucho.ejb.server.AbstractEjbBeanManager<X>
      extended by com.caucho.ejb.session.AbstractSessionManager<X>
          extended by com.caucho.ejb.session.StatelessManager<X>
All Implemented Interfaces:
EnvironmentBean

public class StatelessManager<X>
extends AbstractSessionManager<X>

Server home container for a stateless session bean


Field Summary
 
Fields inherited from class com.caucho.ejb.server.AbstractEjbBeanManager
_ejbClass, _ejbManager, _filename, _line, _location, _mappedName, _ut
 
Constructor Summary
StatelessManager(EjbManager ejbContainer, java.lang.String ejbName, java.lang.String moduleName, AnnotatedType<X> rawAnnType, AnnotatedType<X> annotatedType, EjbLazyGenerator<X> ejbGenerator)
          Creates a new stateless server.
 
Method Summary
 void bind()
           
protected
<T> Bean<T>
createBean(ManagedBeanImpl<X> mBean, java.lang.Class<T> api, java.util.Set<java.lang.reflect.Type> apiList, AnnotatedType<X> extAnnType)
           
protected  BeanGenerator<X> createBeanGenerator()
          Creates the bean generator for the session bean.
protected  EjbInjectionTarget<X> createInjectionTarget()
           
protected
<T> StatelessContext<X,T>
createSessionContext(java.lang.Class<T> api)
           
<T> StatelessPool<X,T>
createStatelessPool(StatelessProxyFactory proxy, StatelessContext<X,T> context, java.util.List<Interceptor<?>> interceptorBeans)
          Called by the StatelessProxy on initialization.
 AbstractContext getContext(java.lang.Object key, boolean forceLoad)
          Returns the context with the given key
protected  java.lang.Class<?> getContextClass()
           
 java.lang.Object[] getInterceptorBindings(java.util.List<Interceptor<?>> interceptorBeans, CreationalContextImpl<?> parentEnv)
           
<T> java.lang.Object
getLocalJndiProxy(java.lang.Class<T> api)
          Returns the JNDI proxy object to create instances of the local interface.
<T> T
getLocalProxy(java.lang.Class<T> api)
          Returns the object implementation
 StatelessPool<X,?> getLocalStatelessPool()
           
<T> T
getRemoteObject(java.lang.Class<T> api, java.lang.String protocol)
          Returns the remote stub for the container
protected  SessionBeanType getSessionBeanType()
           
 int getSessionConcurrentMax()
           
 long getSessionConcurrentTimeout()
           
protected
<T> StatelessContext<X,T>
getSessionContext(java.lang.Class<T> api)
           
 int getSessionIdleMax()
           
protected  java.lang.String getType()
           
 void init()
          Initialize the server during the config phase.
protected  void postStart()
           
 void setLocalStatelessPool(StatelessPool<X,?> pool)
           
 
Methods inherited from class com.caucho.ejb.session.AbstractSessionManager
createProxyFactory, destroy, getBean, getDeployBean, getInjectManager, getLazyGenerator, getLocalApi, getLocalBean, getProxyImplClass, getRemoteApi
 
Methods inherited from class com.caucho.ejb.server.AbstractEjbBeanManager
bindContext, bindInjection, destroy, destroyInstance, encodeId, error, getAnnotatedType, getClassLoader, getContext, getContext, getEjbClass, getEjbContainer, getEJBName, getId, getMappedName, getModuleInjectManager, getModuleName, getProtocolId, getProtocolId, getRawAnnotatedType, getRemoteApiList, getServerProgram, getTimerService, getTransactionTimeout, getUserTransaction, hasRemoteObject, invalidateCache, isContainerTransaction, isDead, isDependValid, lookup, newInstance, registerInjection, setAroundInvoke, setBusinessLocal, setConfigLocation, setContainerTransaction, setEjbClass, setId, setLocation, setMappedName, setRemoteApiList, setResourceList, setServerProgram, setTransactionTimeout, start, timeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatelessManager

public StatelessManager(EjbManager ejbContainer,
                        java.lang.String ejbName,
                        java.lang.String moduleName,
                        AnnotatedType<X> rawAnnType,
                        AnnotatedType<X> annotatedType,
                        EjbLazyGenerator<X> ejbGenerator)
Creates a new stateless server.

Parameters:
urlPrefix - the url prefix for any request to the server
allowJVMCall - allows fast calls to the same JVM (with serialization)
config - the session configuration from the ejb.xml
Method Detail

getType

protected java.lang.String getType()
Overrides:
getType in class AbstractSessionManager<X>

getSessionBeanType

protected SessionBeanType getSessionBeanType()
Overrides:
getSessionBeanType in class AbstractSessionManager<X>

getSessionIdleMax

public int getSessionIdleMax()

getSessionConcurrentMax

public int getSessionConcurrentMax()

getSessionConcurrentTimeout

public long getSessionConcurrentTimeout()

getSessionContext

protected <T> StatelessContext<X,T> getSessionContext(java.lang.Class<T> api)
Overrides:
getSessionContext in class AbstractSessionManager<X>

getLocalJndiProxy

public <T> java.lang.Object getLocalJndiProxy(java.lang.Class<T> api)
Returns the JNDI proxy object to create instances of the local interface.

Specified by:
getLocalJndiProxy in class AbstractEjbBeanManager<X>
Parameters:
api - the bean's api to return a value for

getLocalProxy

public <T> T getLocalProxy(java.lang.Class<T> api)
Returns the object implementation

Overrides:
getLocalProxy in class AbstractSessionManager<X>
Parameters:
api - the bean's api to return a value for

setLocalStatelessPool

public void setLocalStatelessPool(StatelessPool<X,?> pool)

getLocalStatelessPool

public StatelessPool<X,?> getLocalStatelessPool()

createBean

protected <T> Bean<T> createBean(ManagedBeanImpl<X> mBean,
                                 java.lang.Class<T> api,
                                 java.util.Set<java.lang.reflect.Type> apiList,
                                 AnnotatedType<X> extAnnType)
Specified by:
createBean in class AbstractSessionManager<X>

getContextClass

protected java.lang.Class<?> getContextClass()
Overrides:
getContextClass in class AbstractSessionManager<X>

createBeanGenerator

protected BeanGenerator<X> createBeanGenerator()
Creates the bean generator for the session bean.

Overrides:
createBeanGenerator in class AbstractSessionManager<X>

createStatelessPool

public <T> StatelessPool<X,T> createStatelessPool(StatelessProxyFactory proxy,
                                                  StatelessContext<X,T> context,
                                                  java.util.List<Interceptor<?>> interceptorBeans)
Called by the StatelessProxy on initialization.


createInjectionTarget

protected EjbInjectionTarget<X> createInjectionTarget()
Overrides:
createInjectionTarget in class AbstractEjbBeanManager<X>

getRemoteObject

public <T> T getRemoteObject(java.lang.Class<T> api,
                             java.lang.String protocol)
Returns the remote stub for the container

Specified by:
getRemoteObject in class AbstractEjbBeanManager<X>
Parameters:
api - the bean's api to return a value for
protocol - the remote protocol

init

public void init()
          throws java.lang.Exception
Description copied from class: AbstractSessionManager
Initialize the server during the config phase.

Overrides:
init in class AbstractSessionManager<X>
Throws:
java.lang.Exception

createSessionContext

protected <T> StatelessContext<X,T> createSessionContext(java.lang.Class<T> api)
Overrides:
createSessionContext in class AbstractSessionManager<X>

postStart

protected void postStart()
Overrides:
postStart in class AbstractEjbBeanManager<X>

getContext

public AbstractContext getContext(java.lang.Object key,
                                  boolean forceLoad)
Description copied from class: AbstractEjbBeanManager
Returns the context with the given key

Specified by:
getContext in class AbstractEjbBeanManager<X>

getInterceptorBindings

public java.lang.Object[] getInterceptorBindings(java.util.List<Interceptor<?>> interceptorBeans,
                                                 CreationalContextImpl<?> parentEnv)

bind

public void bind()
Overrides:
bind in class AbstractSessionManager<X>