|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.ejb.AbstractServer
public abstract class AbstractServer
Base server for a single home/object bean pair.
| Field Summary | |
|---|---|
protected ComponentImpl |
_component
|
protected java.lang.Class |
_contextImplClass
|
protected javax.sql.DataSource |
_dataSource
|
protected ConfigProgram[] |
_destroyInject
|
protected java.lang.Class |
_ejbClass
|
protected EjbContainer |
_ejbContainer
|
protected java.lang.String |
_ejbName
|
protected java.lang.String |
_filename
|
protected HandleEncoder |
_handleEncoder
|
protected java.lang.String |
_handleServerId
|
protected HomeHandle |
_homeHandle
|
protected java.lang.Class |
_homeStubClass
|
protected java.lang.String |
_id
|
protected ConfigProgram[] |
_initInject
|
protected ConfigProgram |
_initProgram
|
protected int |
_line
|
protected EnvironmentClassLoader |
_loader
|
protected java.lang.Class |
_local21
|
protected java.util.ArrayList<java.lang.Class> |
_localApiList
|
protected EJBLocalHome |
_localHome
|
protected java.lang.Class |
_localHomeClass
|
protected java.lang.String |
_location
|
protected java.lang.String |
_mappedName
|
protected EJBMetaDataImpl |
_metaData
|
protected java.lang.String |
_moduleName
|
protected java.lang.Class |
_primaryKeyClass
|
protected java.util.HashMap<java.lang.String,HandleEncoder> |
_protocolEncoderMap
|
protected java.lang.Class |
_remote21
|
protected java.util.ArrayList<java.lang.Class> |
_remoteApiList
|
protected EJBHome |
_remoteHome
|
protected java.lang.Class |
_remoteHomeClass
|
protected EJBHome |
_remoteHomeView
|
protected java.lang.Class |
_remoteObjectClass
|
protected java.lang.Class |
_remoteStubClass
|
protected java.lang.Class |
_serviceEndpointClass
|
protected long |
_transactionTimeout
|
protected UserTransaction |
_ut
|
| Constructor Summary | |
|---|---|
AbstractServer(EjbContainer container)
Creates a new server container |
|
| Method Summary | |
|---|---|
void |
addClientRemoteConfig(java.lang.StringBuilder sb)
Client information for connecting to the server. |
HandleEncoder |
addHandleEncoder(java.lang.String protocol,
java.lang.String serverId)
|
protected void |
bindContext()
|
protected void |
bindInjection()
|
void |
destroy()
Cleans up the server on shutdown |
void |
destroyInstance(java.lang.Object instance)
Remove an object. |
java.lang.String |
encodeId(java.lang.Object primaryKey)
Returns the encoded id. |
ConfigException |
error(java.lang.String msg)
|
java.lang.Class |
getBeanSkelClass()
Gets the generated skeleton class |
DynamicClassLoader |
getClassLoader()
Gets the class loader |
AbstractContext |
getContext()
|
AbstractContext |
getContext(long key)
|
AbstractContext |
getContext(java.lang.Object key)
|
abstract AbstractContext |
getContext(java.lang.Object key,
boolean forceLoad)
Returns the context with the given key |
protected java.lang.Class |
getEjbClass()
Sets the ejb class |
EjbContainer |
getEjbContainer()
Returns the owning container. |
EJBHome |
getEJBHome()
Returns the EJBHome stub for the container |
EJBLocalHome |
getEJBLocalHome()
Returns the EJBLocalHome stub for the container |
EJBMetaData |
getEJBMetaData()
Returns the meta data |
java.lang.String |
getEJBName()
Returns the ejb's name |
EJBObject |
getEJBObject(java.lang.Object key)
|
HandleEncoder |
getHandleEncoder()
|
HandleEncoder |
getHandleEncoder(java.lang.String protocol)
|
java.lang.String |
getHandleServerId()
|
HomeHandle |
getHomeHandle()
Returns the home handle for the container |
java.lang.Class |
getHomeStubClass()
|
java.lang.String |
getId()
Returns the id, module-path#ejb-name. |
ConfigProgram |
getInitProgram()
Gets the init program. |
java.util.ArrayList<java.lang.Class> |
getLocalApiList()
Sets the remote object class. |
java.lang.Class |
getLocalHomeClass()
Gets the local home class. |
abstract java.lang.Object |
getLocalObject(java.lang.Class api)
Returns the a new local stub for the given API |
abstract java.lang.Object |
getLocalProxy(java.lang.Class api)
Returns the local jndi proxy for the given API |
java.lang.String |
getMappedName()
Returns the mapped name. |
java.lang.String |
getModuleName()
Returns's the module that defined this ejb. |
PostConstructConfig |
getPostConstruct()
|
PreDestroyConfig |
getPreDestroy()
|
java.lang.Class |
getPrimaryKeyClass()
Returns the object key from a handle. |
java.lang.String |
getProtocolId()
The name to use for remoting protocols, such as IIOP and Hessian. |
java.lang.String |
getProtocolId(java.lang.Class cl)
The name to use for remoting protocols, such as IIOP and Hessian. |
java.lang.Class |
getRemote21()
Gets the 2.1 remote interface. |
java.util.ArrayList<java.lang.Class> |
getRemoteApiList()
Returns the remote object list. |
java.lang.Class |
getRemoteHomeClass()
Gets the remote home class. |
abstract java.lang.Object |
getRemoteObject(java.lang.Class api,
java.lang.String protocol)
Returns the remote skeleton for the given API |
java.lang.Object |
getRemoteObject(java.lang.Object key)
Returns the remote object. |
java.lang.Class |
getRemoteObjectClass()
Gets the remote object class. |
java.lang.Class |
getRemoteStubClass()
|
ConfigProgram |
getServerProgram()
Sets the server program. |
java.lang.Class |
getServiceEndpoint()
Gets the service endpoint |
AbstractSessionContext |
getSessionContext()
Returns the session context. |
TimerService |
getTimerService()
Returns the timer service. |
long |
getTransactionTimeout()
Gets the transaction timeout. |
protected java.lang.String |
getType()
|
UserTransaction |
getUserTransaction()
|
boolean |
hasRemoteObject()
Returns true if there is any remote object. |
void |
init()
|
void |
initInstance(java.lang.Object instance)
Initialize an instance |
void |
initInstance(java.lang.Object instance,
ConfigContext env)
Initialize an instance |
protected void |
introspectDestroy(java.util.ArrayList<ConfigProgram> injectList,
java.lang.Class ejbClass)
|
void |
invalidateCache()
Invalidates caches. |
boolean |
isContainerTransaction()
Returns true if container transaction is used. |
boolean |
isDead()
Returns true if the server is dead. |
boolean |
isLocal()
Returns true is there is a local home or local client object for the bean. |
boolean |
isRemote()
Returns true is there is a remote home or remote client object for the bean. |
java.lang.Object |
lookup(java.lang.String jndiName)
Looks up the JNDI object. |
java.lang.Object |
remove(AbstractHandle handle)
Remove an object. |
void |
remove(java.lang.Object primaryKey)
Remove an object. |
void |
setAroundInvoke(AroundInvokeConfig aroundInvoke)
|
void |
setConfigLocation(java.lang.String filename,
int line)
|
void |
setContainerTransaction(boolean isContainerTransaction)
Sets true if container transaction is used. |
void |
setContextImplClass(java.lang.Class cl)
Sets the context implementation class. |
void |
setEjbClass(java.lang.Class cl)
Sets the ejb class |
void |
setEJBName(java.lang.String ejbName)
Sets the ejb name. |
void |
setHandleEncoder(HandleEncoder encoder)
|
void |
setId(java.lang.String id)
Sets the id, module-path#ejb-name. |
void |
setInitProgram(ConfigProgram init)
Sets the init program. |
void |
setLocalApiList(java.util.ArrayList<java.lang.Class> list)
Sets the local api class list |
void |
setLocalHomeClass(java.lang.Class cl)
Sets the local home class. |
void |
setLocation(java.lang.String location)
|
void |
setMappedName(java.lang.String mappedName)
Sets the mapped name, default is to use the EJBName. |
void |
setModuleName(java.lang.String moduleName)
Set's the module that defined this ejb. |
void |
setPostConstruct(PostConstructConfig postConstruct)
|
void |
setPreDestroy(PreDestroyConfig preDestroy)
|
void |
setRemoteApiList(java.util.ArrayList<java.lang.Class> list)
Sets the remote object list. |
void |
setRemoteHomeClass(java.lang.Class cl)
Sets the remote home class. |
void |
setRemoteObjectClass(java.lang.Class cl)
Sets the remote object class. |
void |
setServerProgram(ConfigProgram serverProgram)
Sets the server program. |
void |
setServiceEndpoint(java.lang.Class cl)
Sets the service endpoint. |
void |
setTransactionTimeout(long timeout)
Sets the transaction timeout. |
boolean |
start()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final EjbContainer _ejbContainer
protected final UserTransaction _ut
protected java.lang.String _filename
protected int _line
protected java.lang.String _location
protected java.lang.String _id
protected java.lang.String _ejbName
protected java.lang.String _moduleName
protected java.lang.String _handleServerId
protected java.lang.String _mappedName
protected java.util.HashMap<java.lang.String,HandleEncoder> _protocolEncoderMap
protected HandleEncoder _handleEncoder
protected javax.sql.DataSource _dataSource
protected EnvironmentClassLoader _loader
protected java.lang.Class _ejbClass
protected java.lang.Class _contextImplClass
protected java.lang.Class _local21
protected java.lang.Class _remote21
protected java.lang.Class _remoteHomeClass
protected java.lang.Class _remoteObjectClass
protected java.util.ArrayList<java.lang.Class> _remoteApiList
protected java.lang.Class _primaryKeyClass
protected java.lang.Class _localHomeClass
protected java.util.ArrayList<java.lang.Class> _localApiList
protected java.lang.Class _remoteStubClass
protected java.lang.Class _homeStubClass
protected HomeHandle _homeHandle
protected EJBHome _remoteHome
protected EJBHome _remoteHomeView
protected EJBLocalHome _localHome
protected EJBMetaDataImpl _metaData
protected java.lang.Class _serviceEndpointClass
protected long _transactionTimeout
protected ComponentImpl _component
protected ConfigProgram _initProgram
protected ConfigProgram[] _initInject
protected ConfigProgram[] _destroyInject
| Constructor Detail |
|---|
public AbstractServer(EjbContainer container)
manager - the owning server container| Method Detail |
|---|
public java.lang.String getId()
public void setId(java.lang.String id)
public void setConfigLocation(java.lang.String filename,
int line)
public void setLocation(java.lang.String location)
protected java.lang.String getType()
public void setAroundInvoke(AroundInvokeConfig aroundInvoke)
public void setEJBName(java.lang.String ejbName)
public java.lang.String getEJBName()
public void setModuleName(java.lang.String moduleName)
public java.lang.String getModuleName()
public void setMappedName(java.lang.String mappedName)
public java.lang.String getMappedName()
public java.lang.String getProtocolId()
public java.lang.String getProtocolId(java.lang.Class cl)
public void setEjbClass(java.lang.Class cl)
protected java.lang.Class getEjbClass()
public void setContextImplClass(java.lang.Class cl)
public void setRemoteHomeClass(java.lang.Class cl)
public java.lang.Class getRemoteHomeClass()
public java.lang.Class getRemote21()
public void setRemoteApiList(java.util.ArrayList<java.lang.Class> list)
public java.util.ArrayList<java.lang.Class> getRemoteApiList()
public boolean hasRemoteObject()
public void setRemoteObjectClass(java.lang.Class cl)
public java.lang.Class getRemoteObjectClass()
public void setLocalHomeClass(java.lang.Class cl)
public java.lang.Class getLocalHomeClass()
public void setServiceEndpoint(java.lang.Class cl)
public java.lang.Class getServiceEndpoint()
public void setLocalApiList(java.util.ArrayList<java.lang.Class> list)
public java.util.ArrayList<java.lang.Class> getLocalApiList()
public HandleEncoder getHandleEncoder(java.lang.String protocol)
public java.lang.String encodeId(java.lang.Object primaryKey)
public HandleEncoder addHandleEncoder(java.lang.String protocol,
java.lang.String serverId)
public HandleEncoder getHandleEncoder()
public void setHandleEncoder(HandleEncoder encoder)
public java.lang.String getHandleServerId()
public java.lang.Object lookup(java.lang.String jndiName)
public UserTransaction getUserTransaction()
public EjbContainer getEjbContainer()
public void setServerProgram(ConfigProgram serverProgram)
public ConfigProgram getServerProgram()
public void setTransactionTimeout(long timeout)
public long getTransactionTimeout()
public TimerService getTimerService()
public void invalidateCache()
public java.lang.Object remove(AbstractHandle handle)
public void remove(java.lang.Object primaryKey)
public DynamicClassLoader getClassLoader()
getClassLoader in interface EnvironmentBeanpublic java.lang.Class getBeanSkelClass()
public java.lang.Class getRemoteStubClass()
public java.lang.Class getHomeStubClass()
public EJBMetaData getEJBMetaData()
public HomeHandle getHomeHandle()
public EJBHome getEJBHome()
public AbstractSessionContext getSessionContext()
public EJBLocalHome getEJBLocalHome()
public abstract java.lang.Object getRemoteObject(java.lang.Class api,
java.lang.String protocol)
api - the bean's api to return a value forprotocol - the remote protocolpublic abstract java.lang.Object getLocalObject(java.lang.Class api)
api - the bean's api to return a value forpublic abstract java.lang.Object getLocalProxy(java.lang.Class api)
api - the bean's api to return a value forpublic java.lang.Class getPrimaryKeyClass()
public EJBObject getEJBObject(java.lang.Object key)
throws FinderException
FinderException
public java.lang.Object getRemoteObject(java.lang.Object key)
throws FinderException
FinderExceptionpublic AbstractContext getContext()
public AbstractContext getContext(java.lang.Object key)
throws FinderException
FinderException
public AbstractContext getContext(long key)
throws FinderException
FinderException
public abstract AbstractContext getContext(java.lang.Object key,
boolean forceLoad)
throws FinderException
FinderExceptionpublic void setInitProgram(ConfigProgram init)
public ConfigProgram getInitProgram()
public void initInstance(java.lang.Object instance)
public void initInstance(java.lang.Object instance,
ConfigContext env)
public void destroyInstance(java.lang.Object instance)
public void init()
throws java.lang.Exception
java.lang.Exception
public boolean start()
throws java.lang.Exception
java.lang.Exceptionprotected void bindContext()
protected void bindInjection()
protected void introspectDestroy(java.util.ArrayList<ConfigProgram> injectList,
java.lang.Class ejbClass)
public boolean isContainerTransaction()
public void setContainerTransaction(boolean isContainerTransaction)
public boolean isLocal()
public boolean isRemote()
public boolean isDead()
public void destroy()
public PostConstructConfig getPostConstruct()
public PreDestroyConfig getPreDestroy()
public void setPostConstruct(PostConstructConfig postConstruct)
public void setPreDestroy(PreDestroyConfig preDestroy)
public void addClientRemoteConfig(java.lang.StringBuilder sb)
public ConfigException error(java.lang.String msg)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||