|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.ejb.Container
This is the base class for all EJB-containers in JBoss. A Container functions as the central hub of all metadata and plugins. Through this the container plugins can get hold of the other plugins and any metadata they need.
The EJBDeployer creates instances of subclasses of this class and calls the appropriate initialization methods.
A Container does not perform any significant work, but instead delegates to the plugins to provide for all kinds of algorithmic functionality.
EJBDeployer
Nested Class Summary | |
protected class |
Container.AbstractContainerInterceptor
The base class for container interceptors. |
Field Summary | |
static String |
BASE_EJB_CONTAINER_NAME
|
protected Class |
beanClass
This is the EnterpriseBean class |
protected ClassLoader |
classLoader
This is the classloader of this container. |
protected long |
createCount
The number of create invocations that have been made |
static javax.management.ObjectName |
EJB_CONTAINER_QUERY_NAME
|
protected static Method |
EJB_TIMEOUT
A reference to TimedObject.ejbTimeout(javax.ejb.Timer) . |
protected EjbModule |
ejbModule
This is the application that this container is a part of |
protected static Method |
EJBOBJECT_REMOVE
|
protected Class |
homeInterface
This is the Home interface class |
protected InvocationStatistics |
invokeStats
Time statistics for the invoke(Invocation) methods |
protected String |
jaccContextID
The JACC context id for the container |
protected ClassLoader |
localClassLoader
This is the local classloader of this container. |
protected Class |
localHomeInterface
The local home interface class |
protected Class |
localInterface
The local inteface class |
protected LocalProxyFactory |
localProxyFactory
??? |
protected BeanLockManager |
lockManager
This is the bean lock manager that is to be used |
protected Map |
marshalledInvocationMapping
Maps for MarshalledInvocation mapping |
protected BeanMetaData |
metaData
This is the new metadata. |
static javax.management.ObjectName |
ORB_NAME
|
protected HashMap |
proxyFactories
HashMap |
protected ThreadLocal |
proxyFactoryTL
The Proxy factory is set in the Invocation. |
protected Class |
remoteInterface
This is the Remote interface class |
protected long |
removeCount
The number of create invocations that have been made |
protected RealmMapping |
rm
This is the realm mapping |
protected Object |
securityProxy
The custom security proxy used by the SecurityInterceptor |
protected AuthenticationManager |
sm
This is the SecurityManager |
protected TransactionManager |
tm
This is the TransactionManager |
protected ClassLoader |
webClassLoader
The class loader for remote dynamic classloading |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
Container()
|
Method Summary | |
abstract void |
addInterceptor(Interceptor in)
|
void |
addProxyFactory(String invokerBinding,
EJBProxyFactory factory)
|
Object |
createBeanClassInstance()
Returns a new instance of the bean class or a subclass of the bean class. |
protected void |
createService()
The EJBDeployer calls this method. |
protected void |
destroyService()
A default implementation of destroying the container service (no-op). |
Class |
getBeanClass()
Returns the bean class instance of this container. |
BeanMetaData |
getBeanMetaData()
Returns the metadata of this container. |
ClassLoader |
getClassLoader()
Returns the classloader for this container. |
long |
getCreateCount()
Gets the number of create invocations that have been made |
org.jboss.deployment.DeploymentInfo |
getDeploymentInfo()
Gets the DeploymentInfo for this Container |
EjbModule |
getEjbModule()
Gets the application deployment unit for this container. |
Context |
getEnvContext()
Get the components environment context |
Class |
getHomeClass()
this actually should be called remotehome, but for interface compliance purposes we keep it like that |
InvocationStatistics |
getInvokeStats()
Gets the invocation statistics collection |
String |
getJaccContextID()
|
javax.management.ObjectName |
getJmxName()
Build a JMX name using the pattern jboss.j2ee:service=EJB,jndiName=[jndiName] where the [jndiName] is either the bean remote home JNDI binding, or the local home JNDI binding if the bean has no remote interfaces. |
Class |
getLocalClass()
|
ClassLoader |
getLocalClassLoader()
Returns the local classloader for this container. |
Class |
getLocalHomeClass()
|
BeanLockManager |
getLockManager()
|
MessageDestinationMetaData |
getMessageDestination(String link)
|
Set |
getMethodPermissions(Method m,
InvocationType iface)
Returns the permissions for a method. |
EJBProxyFactory |
getProxyFactory()
|
RealmMapping |
getRealmMapping()
|
Class |
getRemoteClass()
|
long |
getRemoveCount()
Gets the number of remove invocations that have been made |
AuthenticationManager |
getSecurityManager()
|
Object |
getSecurityProxy()
|
javax.ejb.TimerService |
getTimerService(Object pKey)
Creates the single Timer Servic for this container if not already created |
TransactionManager |
getTransactionManager()
Returns this container's transaction manager. |
ClassLoader |
getWebClassLoader()
Get the class loader for dynamic class loading via http. |
abstract Object |
internalInvoke(Invocation mi)
This method is called when a method call comes in on an EJBObject. |
abstract Object |
internalInvokeHome(Invocation mi)
This method is called when a method call comes in on the Home object. |
Object |
invoke(Invocation mi)
The detached invoker operation. |
boolean |
isCallByValue()
Whether the bean is call by value |
EJBProxyFactory |
lookupProxyFactory(String binding)
|
void |
removeTimerService(Object pKey)
Removes Timer Servic for this container |
void |
setBeanMetaData(BeanMetaData metaData)
Sets the meta data for this container. |
void |
setClassLoader(ClassLoader cl)
Sets the class loader for this container. |
void |
setDeploymentInfo(org.jboss.deployment.DeploymentInfo di)
Sets the DeploymentInfo of this Container |
void |
setEjbModule(EjbModule app)
Sets the application deployment unit for this container. |
void |
setJaccContextID(String id)
|
void |
setLocalClassLoader(ClassLoader cl)
Sets the local class loader for this container. |
void |
setLockManager(BeanLockManager lockManager)
|
void |
setProxyFactory(Object factory)
|
void |
setRealmMapping(RealmMapping rm)
|
void |
setSecurityManager(AuthenticationManager sm)
|
void |
setSecurityProxy(Object proxy)
|
void |
setTransactionManager(TransactionManager tm)
Sets a transaction manager for this container. |
void |
setWebClassLoader(ClassLoader webClassLoader)
Set the class loader for dynamic class loading via http. |
protected void |
startService()
A default implementation of starting the container service. |
protected void |
stopService()
A default implementation of stopping the container service (no-op). |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Field Detail |
public static final String BASE_EJB_CONTAINER_NAME
public static final javax.management.ObjectName ORB_NAME
public static final javax.management.ObjectName EJB_CONTAINER_QUERY_NAME
protected static final Method EJBOBJECT_REMOVE
protected static final Method EJB_TIMEOUT
TimedObject.ejbTimeout(javax.ejb.Timer)
.
protected EjbModule ejbModule
protected ClassLoader localClassLoader
protected ClassLoader classLoader
protected ClassLoader webClassLoader
protected BeanMetaData metaData
protected Class beanClass
protected Class homeInterface
protected Class remoteInterface
protected Class localHomeInterface
protected Class localInterface
protected TransactionManager tm
protected AuthenticationManager sm
protected RealmMapping rm
protected Object securityProxy
protected BeanLockManager lockManager
protected LocalProxyFactory localProxyFactory
protected Map marshalledInvocationMapping
protected HashMap proxyFactories
protected ThreadLocal proxyFactoryTL
protected long createCount
protected long removeCount
protected InvocationStatistics invokeStats
protected String jaccContextID
Constructor Detail |
public Container()
Method Detail |
public Class getLocalClass()
public Class getLocalHomeClass()
public Class getRemoteClass()
public Class getHomeClass()
public boolean isCallByValue()
public void setTransactionManager(TransactionManager tm)
tm
- TransactionManager
public TransactionManager getTransactionManager()
public void setSecurityManager(AuthenticationManager sm)
public AuthenticationManager getSecurityManager()
public BeanLockManager getLockManager()
public void setLockManager(BeanLockManager lockManager)
public void addProxyFactory(String invokerBinding, EJBProxyFactory factory)
public void setRealmMapping(RealmMapping rm)
public RealmMapping getRealmMapping()
public void setSecurityProxy(Object proxy)
public Object getSecurityProxy()
public EJBProxyFactory getProxyFactory()
public void setProxyFactory(Object factory)
public EJBProxyFactory lookupProxyFactory(String binding)
public final org.jboss.deployment.DeploymentInfo getDeploymentInfo()
public final void setDeploymentInfo(org.jboss.deployment.DeploymentInfo di)
di
- The new DeploymentInfo to be usedpublic void setEjbModule(EjbModule app)
app
- application for this containerpublic String getJaccContextID()
public void setJaccContextID(String id)
public EjbModule getEjbModule()
getEjbModule
in interface ContainerMBean
public long getCreateCount()
getCreateCount
in interface ContainerMBean
public long getRemoveCount()
getRemoveCount
in interface ContainerMBean
public InvocationStatistics getInvokeStats()
getInvokeStats
in interface ContainerMBean
public void setLocalClassLoader(ClassLoader cl)
cl
- public ClassLoader getLocalClassLoader()
public void setClassLoader(ClassLoader cl)
cl
- public ClassLoader getClassLoader()
public ClassLoader getWebClassLoader()
public void setWebClassLoader(ClassLoader webClassLoader)
public void setBeanMetaData(BeanMetaData metaData)
metaData
- public Context getEnvContext() throws NamingException
getEnvContext
in interface ContainerMBean
NamingException
public BeanMetaData getBeanMetaData()
getBeanMetaData
in interface ContainerMBean
public Set getMethodPermissions(Method m, InvocationType iface)
public Class getBeanClass()
public Object createBeanClassInstance() throws Exception
Exception
Class.newInstance()
public javax.management.ObjectName getJmxName()
public javax.ejb.TimerService getTimerService(Object pKey) throws IllegalStateException
getTimerService
in interface ContainerMBean
pKey
- Bean id
IllegalStateException
- If the type of EJB is not allowed to use the timer serviceEJBContext.getTimerService()
public void removeTimerService(Object pKey) throws IllegalStateException
removeTimerService
in interface ContainerMBean
pKey
- Bean id
IllegalStateException
- If the type of EJB is not allowed to use the timer serviceprotected void createService() throws Exception
Exception
- if loading the bean class failed
(ClassNotFoundException) or setting up "java:"
naming environment failed (DeploymentException)protected void startService() throws Exception
Exception
- An exception that occured during startprotected void stopService() throws Exception
Exception
protected void destroyService() throws Exception
Exception
public abstract Object internalInvokeHome(Invocation mi) throws Exception
mi
- the object holding all info about this invocation
Exception
public abstract Object internalInvoke(Invocation mi) throws Exception
Exception
public abstract void addInterceptor(Interceptor in)
public Object invoke(Invocation mi) throws Exception
invoke
in interface ContainerMBean
mi
- - the method invocation context
Exception
- on errorpublic MessageDestinationMetaData getMessageDestination(String link)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |