com.caucho.ejb.session
Class StatelessServer

java.lang.Object
  extended by com.caucho.ejb.AbstractServer
      extended by com.caucho.ejb.session.SessionServer
          extended by com.caucho.ejb.session.StatelessServer
All Implemented Interfaces:
EnvironmentBean

public class StatelessServer
extends SessionServer

Server home container for a stateless session bean


Field Summary
protected static java.util.logging.Logger log
           
 
Fields inherited from class com.caucho.ejb.AbstractServer
_component, _contextImplClass, _dataSource, _destroyInject, _ejbClass, _ejbContainer, _ejbName, _filename, _handleEncoder, _handleServerId, _homeHandle, _homeStubClass, _id, _initInject, _initProgram, _line, _loader, _local21, _localApiList, _localHome, _localHomeClass, _location, _mappedName, _metaData, _moduleName, _primaryKeyClass, _protocolEncoderMap, _remote21, _remoteApiList, _remoteHome, _remoteHomeClass, _remoteHomeView, _remoteObjectClass, _remoteStubClass, _serviceEndpointClass, _transactionTimeout, _ut
 
Constructor Summary
StatelessServer(EjbContainer ejbContainer)
          Creates a new stateless server.
 
Method Summary
protected  ComponentImpl createSessionComponent(java.lang.Class api)
           
 void destroy()
          Cleans up the entity server nicely.
 AbstractContext getContext()
           
 AbstractContext getContext(java.lang.Object key, boolean forceLoad)
          Returns the context with the given key
 EJBObject getEJBObject(java.lang.Object key)
          Finds the remote bean by its key.
 java.lang.Object getLocalObject(java.lang.Class api)
          Returns the object implementation
 java.lang.Object getLocalProxy(java.lang.Class api)
          Returns the JNDI proxy object to create instances of the local interface.
 java.lang.Object getRemoteObject()
          Returns the 3.0 remote stub for the container
 java.lang.Object getRemoteObject(java.lang.Class api, java.lang.String protocol)
          Returns the remote stub for the container
 java.lang.Object getRemoteObject(java.lang.Object key)
          Returns the remote object.
 AbstractSessionContext getSessionContext()
          Returns the session context.
protected  java.lang.String getType()
           
 void init()
          Initialize the server
protected  void introspectDestroy(java.util.ArrayList<ConfigProgram> injectList, java.lang.Class ejbClass)
           
 
Methods inherited from class com.caucho.ejb.session.SessionServer
bindInjection, getComponent, getEJBLocalHome, getPrimaryKeyClass
 
Methods inherited from class com.caucho.ejb.AbstractServer
addClientRemoteConfig, addHandleEncoder, bindContext, destroyInstance, encodeId, error, getBeanSkelClass, getClassLoader, getContext, getContext, getEjbClass, getEjbContainer, getEJBHome, getEJBMetaData, getEJBName, getHandleEncoder, getHandleEncoder, getHandleServerId, getHomeHandle, getHomeStubClass, getId, getInitProgram, getLocalApiList, getLocalHomeClass, getMappedName, getModuleName, getPostConstruct, getPreDestroy, getProtocolId, getProtocolId, getRemote21, getRemoteApiList, getRemoteHomeClass, getRemoteObjectClass, getRemoteStubClass, getServerProgram, getServiceEndpoint, getTimerService, getTransactionTimeout, getUserTransaction, hasRemoteObject, initInstance, initInstance, invalidateCache, isContainerTransaction, isDead, isLocal, isRemote, lookup, remove, remove, setAroundInvoke, setConfigLocation, setContainerTransaction, setContextImplClass, setEjbClass, setEJBName, setHandleEncoder, setId, setInitProgram, setLocalApiList, setLocalHomeClass, setLocation, setMappedName, setModuleName, setPostConstruct, setPreDestroy, setRemoteApiList, setRemoteHomeClass, setRemoteObjectClass, setServerProgram, setServiceEndpoint, setTransactionTimeout, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static java.util.logging.Logger log
Constructor Detail

StatelessServer

public StatelessServer(EjbContainer ejbContainer)
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 SessionServer

getLocalProxy

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

Specified by:
getLocalProxy in class AbstractServer
Parameters:
api - the bean's api to return a value for

getLocalObject

public java.lang.Object getLocalObject(java.lang.Class api)
Returns the object implementation

Specified by:
getLocalObject in class AbstractServer
Parameters:
api - the bean's api to return a value for

createSessionComponent

protected ComponentImpl createSessionComponent(java.lang.Class api)
Specified by:
createSessionComponent in class SessionServer

getRemoteObject

public java.lang.Object getRemoteObject()
Returns the 3.0 remote stub for the container


getRemoteObject

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

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

getRemoteObject

public java.lang.Object getRemoteObject(java.lang.Object key)
Returns the remote object.

Overrides:
getRemoteObject in class AbstractServer

init

public void init()
          throws java.lang.Exception
Description copied from class: SessionServer
Initialize the server

Overrides:
init in class SessionServer
Throws:
java.lang.Exception

introspectDestroy

protected void introspectDestroy(java.util.ArrayList<ConfigProgram> injectList,
                                 java.lang.Class ejbClass)
Overrides:
introspectDestroy in class AbstractServer

getEJBObject

public EJBObject getEJBObject(java.lang.Object key)
                       throws FinderException
Finds the remote bean by its key.

Overrides:
getEJBObject in class AbstractServer
Parameters:
key - the remote key
Returns:
the remote interface of the entity.
Throws:
FinderException

getContext

public AbstractContext getContext()
Overrides:
getContext in class SessionServer

getContext

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

Specified by:
getContext in class AbstractServer

getSessionContext

public AbstractSessionContext getSessionContext()
Description copied from class: AbstractServer
Returns the session context.

Overrides:
getSessionContext in class AbstractServer

destroy

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

Overrides:
destroy in class AbstractServer