public abstract class AbstractEjbBeanManager<X> extends java.lang.Object implements EnvironmentBean
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<X> |
_ejbClass |
protected EjbManager |
_ejbManager |
protected java.lang.String |
_filename |
protected int |
_line |
protected java.lang.String |
_location |
protected java.lang.String |
_mappedName |
protected UserTransaction |
_ut |
Constructor and Description |
---|
AbstractEjbBeanManager(EjbManager ejbManager,
java.lang.String ejbName,
java.lang.String moduleName,
AnnotatedType<X> rawAnnotatedType,
AnnotatedType<X> annotatedType)
Creates a new server container
|
Modifier and Type | Method and Description |
---|---|
void |
bind() |
protected void |
bindContext() |
protected void |
bindInjection() |
protected EjbInjectionTarget<X> |
createInjectionTarget() |
void |
destroy()
Cleans up the server on shutdown
|
void |
destroy(java.lang.Object instance,
CreationalContextImpl<?> env) |
void |
destroyInstance(X instance)
Initialize an instance
|
java.lang.String |
encodeId(java.lang.Object primaryKey)
Returns the encoded id.
|
ConfigException |
error(java.lang.String msg) |
AnnotatedType<X> |
getAnnotatedType() |
DynamicClassLoader |
getClassLoader()
Gets the class loader
|
AbstractContext<X> |
getContext() |
AbstractContext<?> |
getContext(java.lang.Object key) |
abstract AbstractContext<?> |
getContext(java.lang.Object key,
boolean forceLoad)
Returns the context with the given key
|
Bean<X> |
getDeployBean() |
java.lang.Class<X> |
getEjbClass()
Sets the ejb class
|
EjbManager |
getEjbContainer()
Returns the owning container.
|
java.lang.String |
getEJBName()
Returns the ejb's name
|
java.lang.String |
getId()
Returns the id, module-path#ejb-name.
|
InjectManager |
getInjectManager() |
java.util.ArrayList<AnnotatedType<? super X>> |
getLocalApi() |
AnnotatedType<X> |
getLocalBean() |
abstract <T> java.lang.Object |
getLocalJndiProxy(java.lang.Class<T> api)
Returns the local jndi proxy for the given API
|
abstract <T> T |
getLocalProxy(java.lang.Class<T> api)
Returns the a new local stub for the given API
|
java.lang.String |
getMappedName()
Returns the mapped name.
|
InjectManager |
getModuleInjectManager() |
java.lang.String |
getModuleName()
Returns the module that defined this ejb.
|
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.
|
AnnotatedType<X> |
getRawAnnotatedType() |
java.util.ArrayList<AnnotatedType<? super X>> |
getRemoteApi() |
java.util.ArrayList<java.lang.Class<?>> |
getRemoteApiList()
Returns the remote object list.
|
abstract <T> T |
getRemoteObject(java.lang.Class<T> api,
java.lang.String protocol)
Returns the remote skeleton for the given API
|
ConfigProgram |
getServerProgram()
Sets the server program.
|
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 |
invalidateCache()
Invalidates caches.
|
boolean |
isContainerTransaction()
Returns true if container transaction is used.
|
boolean |
isDead()
Returns true if the server is dead.
|
boolean |
isDependValid(java.util.ArrayList<AbstractEjbBeanManager<?>> bindList) |
java.lang.Object |
lookup(java.lang.String jndiName)
Looks up the JNDI object.
|
X |
newInstance(CreationalContextImpl<X> env) |
protected void |
postStart() |
protected void |
registerInjection() |
void |
setAroundInvoke(AroundInvokeConfig aroundInvoke) |
void |
setBusinessLocal(java.lang.Class<?> local) |
void |
setConfigLocation(java.lang.String filename,
int line) |
void |
setContainerTransaction(boolean isContainerTransaction)
Sets true if container transaction is used.
|
void |
setEjbClass(java.lang.Class<X> cl)
Sets the ejb class
|
void |
setId(java.lang.String id)
Sets the id, module-path#ejb-name.
|
void |
setLocation(java.lang.String location) |
void |
setMappedName(java.lang.String mappedName)
Sets the mapped name, default is to use the EJBName.
|
void |
setRemoteApiList(java.util.ArrayList<java.lang.Class<?>> list)
Sets the remote object list.
|
void |
setResourceList(java.util.ArrayList<ResourceGroupConfig> resourceList) |
void |
setServerProgram(ConfigProgram serverProgram)
Sets the server program.
|
void |
setTransactionTimeout(long timeout)
Sets the transaction timeout.
|
boolean |
start() |
void |
timeout(Timer timer) |
java.lang.String |
toString() |
protected final EjbManager _ejbManager
protected final UserTransaction _ut
protected java.lang.String _filename
protected int _line
protected java.lang.String _location
protected java.lang.Class<X> _ejbClass
protected java.lang.String _mappedName
public AbstractEjbBeanManager(EjbManager ejbManager, java.lang.String ejbName, java.lang.String moduleName, AnnotatedType<X> rawAnnotatedType, AnnotatedType<X> annotatedType)
manager
- the owning server containerprotected EjbInjectionTarget<X> createInjectionTarget()
public java.lang.String getId()
public InjectManager getModuleInjectManager()
public InjectManager getInjectManager()
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 java.lang.String getEJBName()
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 AnnotatedType<X> getRawAnnotatedType()
public AnnotatedType<X> getAnnotatedType()
public void setEjbClass(java.lang.Class<X> cl)
public java.lang.Class<X> getEjbClass()
public void setRemoteApiList(java.util.ArrayList<java.lang.Class<?>> list)
public java.util.ArrayList<java.lang.Class<?>> getRemoteApiList()
public boolean hasRemoteObject()
public java.util.ArrayList<AnnotatedType<? super X>> getLocalApi()
public java.util.ArrayList<AnnotatedType<? super X>> getRemoteApi()
public AnnotatedType<X> getLocalBean()
public java.lang.String encodeId(java.lang.Object primaryKey)
public boolean isDependValid(java.util.ArrayList<AbstractEjbBeanManager<?>> bindList)
bindList
- public java.lang.Object lookup(java.lang.String jndiName)
public UserTransaction getUserTransaction()
public EjbManager getEjbContainer()
public void setServerProgram(ConfigProgram serverProgram)
public ConfigProgram getServerProgram()
public void setTransactionTimeout(long timeout)
public long getTransactionTimeout()
@Configurable public void setBusinessLocal(java.lang.Class<?> local)
public TimerService getTimerService()
public void invalidateCache()
public DynamicClassLoader getClassLoader()
getClassLoader
in interface EnvironmentBean
public void bind()
public abstract <T> T getRemoteObject(java.lang.Class<T> api, java.lang.String protocol)
api
- the bean's api to return a value forprotocol
- the remote protocolpublic abstract <T> T getLocalProxy(java.lang.Class<T> api)
api
- the bean's api to return a value forpublic abstract <T> java.lang.Object getLocalJndiProxy(java.lang.Class<T> api)
api
- the bean's api to return a value forpublic AbstractContext<X> getContext()
public AbstractContext<?> getContext(java.lang.Object key) throws FinderException
FinderException
public abstract AbstractContext<?> getContext(java.lang.Object key, boolean forceLoad) throws FinderException
FinderException
public void timeout(Timer timer)
public void init() throws java.lang.Exception
java.lang.Exception
public X newInstance(CreationalContextImpl<X> env)
public void destroy(java.lang.Object instance, CreationalContextImpl<?> env)
public void destroyInstance(X instance)
public boolean start() throws java.lang.Exception
java.lang.Exception
protected void bindContext()
protected void registerInjection()
protected void bindInjection()
protected void postStart()
public boolean isContainerTransaction()
public void setContainerTransaction(boolean isContainerTransaction)
public void setResourceList(java.util.ArrayList<ResourceGroupConfig> resourceList)
public boolean isDead()
public void destroy()
public ConfigException error(java.lang.String msg)
public java.lang.String toString()
toString
in class java.lang.Object