com.caucho.ejb.session
Class StatefulManager<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.StatefulManager<X>
All Implemented Interfaces:
EnvironmentBean

public class StatefulManager<X>
extends AbstractSessionManager<X>

Server container for a session bean.


Field Summary
 
Fields inherited from class com.caucho.ejb.server.AbstractEjbBeanManager
_ejbClass, _ejbManager, _filename, _line, _location, _mappedName, _ut
 
Constructor Summary
StatefulManager(EjbManager ejbContainer, java.lang.String ejbName, java.lang.String moduleName, AnnotatedType<X> rawAnnType, AnnotatedType<X> annotatedType, EjbLazyGenerator<X> lazyGenerator)
           
 
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> StatefulContext<X,T>
createSessionContext(java.lang.Class<T> api)
           
 void destroy()
          Cleans up the entity server nicely.
 java.lang.String generateKey()
           
 AbstractContext<X> getContext(java.lang.Object key, boolean forceLoad)
          Finds the remote bean by its key.
protected  java.lang.Class<?> getContextClass()
           
 long getIdleTimeout()
           
<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
<T> T
getRemoteObject(java.lang.Class<T> api, java.lang.String protocol)
          Returns the remote stub for the container
protected  SessionBeanType getSessionBeanType()
           
<T> StatefulContext<X,T>
getSessionContext(java.lang.Class<T> api)
           
 java.lang.Object getStatefulProxy(java.lang.String key)
           
protected  java.lang.String getType()
           
<T> T
initProxy(T instance, CreationalContextImpl<T> env)
           
 void remove(java.lang.String key)
          Remove an object.
 
Methods inherited from class com.caucho.ejb.session.AbstractSessionManager
createProxyFactory, getBean, getDeployBean, getInjectManager, getLazyGenerator, getLocalApi, getLocalBean, getProxyImplClass, getRemoteApi, init
 
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, postStart, 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

StatefulManager

public StatefulManager(EjbManager ejbContainer,
                       java.lang.String ejbName,
                       java.lang.String moduleName,
                       AnnotatedType<X> rawAnnType,
                       AnnotatedType<X> annotatedType,
                       EjbLazyGenerator<X> lazyGenerator)
Method Detail

getType

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

getContextClass

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

getSessionBeanType

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

getIdleTimeout

public long getIdleTimeout()

bind

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

getSessionContext

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

createInjectionTarget

protected EjbInjectionTarget<X> createInjectionTarget()
Overrides:
createInjectionTarget in class AbstractEjbBeanManager<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

getStatefulProxy

public java.lang.Object getStatefulProxy(java.lang.String key)

initProxy

public <T> T initProxy(T instance,
                       CreationalContextImpl<T> env)

createSessionContext

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

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>

createBeanGenerator

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

Overrides:
createBeanGenerator in class AbstractSessionManager<X>

getContext

public AbstractContext<X> getContext(java.lang.Object key,
                                     boolean forceLoad)
                              throws FinderException
Finds the remote bean by its key.

Specified by:
getContext in class AbstractEjbBeanManager<X>
Parameters:
key - the remote key
Returns:
the remote interface of the entity.
Throws:
FinderException

generateKey

public java.lang.String generateKey()

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

remove

public void remove(java.lang.String key)
Remove an object.


destroy

public void destroy()
Cleans up the entity server nicely.

Overrides:
destroy in class AbstractSessionManager<X>