jrun.ejb
Class EJBContainer

jrunx.kernel.ServiceAdapter
  |
  +--jrunx.kernel.ServicePartition
        |
        +--jrunx.kernel.ConfigurableServicePartition
              |
              +--jrun.j2ee.J2EEModule
                    |
                    +--jrun.ejb.Container
                          |
                          +--jrun.ejb.EJBContainer
All Implemented Interfaces:
ConfigurableServicePartitionMBean, ContainerMBean, EJBContainerMBean, J2EEModuleMBean, javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean
Direct Known Subclasses:
ClientInvokableContainer, MessageDrivenContainer

public abstract class EJBContainer
extends Container
implements EJBContainerMBean

The superclass of all EJB containers.

Author:
Sean Neville, Paul Reilly, Polina Alber
See Also:
Serialized Form

Field Summary
protected  InstancePool instancePool
           
protected  InvokerInterceptor invoker
           
protected  JRunSecurityManager jsm
           
static java.lang.String LOCAL
          This is the prefix used for making local access EJBs available via JNDI, without clobbering remote access EJBs.
static java.lang.String OBJECT_NAME
           
protected  java.util.Map objectMethodMap
          A Map of all EJBObject Methods.
protected  PersistenceStore persistenceStore
           
protected  javax.transaction.TransactionManager tm
           
 
Fields inherited from class jrun.ejb.Container
classLoader, firstInterceptor
 
Fields inherited from class jrunx.kernel.ServicePartition
sortedServices
 
Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Constructor Summary
EJBContainer()
           
 
Method Summary
 Interceptor createInvokerInterceptor()
           
 void destroy()
          Every service is eventually destroyed.
 void destroyInterceptors()
          Invoke destroy on all of the interceptors in this container.
 java.lang.Class getBeanClass()
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
abstract  java.lang.Object getEJBHome(EJBInvocation ejbInvocation)
           
abstract  java.lang.Object getEJBLocalHome(EJBInvocation ejbInvocation)
           
 EJBMetaData getEJBMetaData()
           
 java.lang.String getEJBModuleName()
           
 java.lang.Object getHandle(EJBInvocation ejbInvocation)
           
 InstancePool getInstancePool()
           
 java.lang.String getJNDIName()
           
 java.util.Set getMethodPermissions(java.lang.reflect.Method m, boolean _remote)
           
 java.util.Map getObjectMethodMap()
           
 PersistenceStore getPersistenceStore()
          Gets the persistence store, if any, otherwise, returns null
 JRunSecurityManager getSecurityManager()
           
 javax.transaction.TransactionManager getTransactionManager()
           
 void init()
          Not every service needs to init, implement it out of convenience.
 void initInterceptors()
          Invoke init on all of the interceptors in this container.
 java.lang.Object invokeObjectMethod(EJBInvocation ejbInvocation)
           
 java.lang.Object isIdentical(EJBInvocation ejbInvocation)
           
 void persistEJBXML()
           
 void persistJRunEJBXML()
           
 void setEJBMetaData(EJBMetaData ejbMetaData)
           
 void setEJBModuleName(java.lang.String ejbModuleName)
           
 void setInstancePool(InstancePool instancePool)
           
 void setJNDIName(java.lang.String jndiName)
           
 void setPersistenceStore(PersistenceStore persistenceStore)
          Sets the persistence store
 void setSecurityManager(JRunSecurityManager sm)
           
 void setTransactionManager(javax.transaction.TransactionManager tm)
           
 void start()
          Every service other than mere data collections should start
 void startInterceptors()
          Invoke start on all of the interceptors in this container.
 void stop()
          Every service other than mere data collections should stop
 void stopInterceptors()
          Invoke stop on all of the interceptors in this container.
 
Methods inherited from class jrun.ejb.Container
addInterceptor, addInterceptor, getFirstInterceptor, getFirstInterceptorClass, removeInterceptor
 
Methods inherited from class jrun.j2ee.J2EEModule
getClassLoader, getDeploymentOrigin, getEJBPeers, getJ2EEMetaData, isRunning, postStart, resolveEJBLinks, setClassLoader, setDeploymentOrigin, setEJBPeers, setJ2EEMetaData, setName, setRunning
 
Methods inherited from class jrunx.kernel.ConfigurableServicePartition
destroyServices, initServices, loadAndInit, loadChildren, setChildElements, startServices, stopServices
 
Methods inherited from class jrunx.kernel.ServicePartition
addService, addService, getServices, invokeChain, iterator, removeService, removeService
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus
 
Methods inherited from interface jrun.ejb.ContainerMBean
addInterceptor, getFirstInterceptorClass
 
Methods inherited from interface jrun.j2ee.J2EEModuleMBean
getDeploymentOrigin, isRunning, setDeploymentOrigin
 
Methods inherited from interface jrunx.kernel.ServicePartitionMBean
addService, addService, iterator, removeService, removeService
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
getStatus, updateStatus
 

Field Detail

OBJECT_NAME

public static final java.lang.String OBJECT_NAME

LOCAL

public static final java.lang.String LOCAL
This is the prefix used for making local access EJBs available via JNDI, without clobbering remote access EJBs.

instancePool

protected InstancePool instancePool

persistenceStore

protected PersistenceStore persistenceStore

invoker

protected InvokerInterceptor invoker

tm

protected javax.transaction.TransactionManager tm

jsm

protected JRunSecurityManager jsm

objectMethodMap

protected java.util.Map objectMethodMap
A Map of all EJBObject Methods.
Constructor Detail

EJBContainer

public EJBContainer()
Method Detail

setEJBModuleName

public void setEJBModuleName(java.lang.String ejbModuleName)

getEJBModuleName

public java.lang.String getEJBModuleName()

setPersistenceStore

public void setPersistenceStore(PersistenceStore persistenceStore)
Sets the persistence store
Parameters:
persistenceStore -  

getPersistenceStore

public PersistenceStore getPersistenceStore()
Gets the persistence store, if any, otherwise, returns null
Returns:
The persistenceStore

invokeObjectMethod

public java.lang.Object invokeObjectMethod(EJBInvocation ejbInvocation)
                                    throws java.lang.Exception

setInstancePool

public void setInstancePool(InstancePool instancePool)

getInstancePool

public InstancePool getInstancePool()

getObjectMethodMap

public java.util.Map getObjectMethodMap()

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager tm)

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()

setSecurityManager

public void setSecurityManager(JRunSecurityManager sm)

getSecurityManager

public JRunSecurityManager getSecurityManager()

setEJBMetaData

public void setEJBMetaData(EJBMetaData ejbMetaData)

getEJBMetaData

public EJBMetaData getEJBMetaData()

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface EJBContainerMBean

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface EJBContainerMBean

setJNDIName

public void setJNDIName(java.lang.String jndiName)
Specified by:
setJNDIName in interface EJBContainerMBean

getJNDIName

public java.lang.String getJNDIName()
Specified by:
getJNDIName in interface EJBContainerMBean

getMethodPermissions

public java.util.Set getMethodPermissions(java.lang.reflect.Method m,
                                          boolean _remote)

getBeanClass

public java.lang.Class getBeanClass()

isIdentical

public java.lang.Object isIdentical(EJBInvocation ejbInvocation)

getEJBHome

public abstract java.lang.Object getEJBHome(EJBInvocation ejbInvocation)

getEJBLocalHome

public abstract java.lang.Object getEJBLocalHome(EJBInvocation ejbInvocation)

getHandle

public java.lang.Object getHandle(EJBInvocation ejbInvocation)

init

public void init()
          throws java.lang.Exception
Description copied from class: ServiceAdapter
Not every service needs to init, implement it out of convenience.
Specified by:
init in interface Service
Overrides:
init in class ConfigurableServicePartition

start

public void start()
           throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service other than mere data collections should start
Specified by:
start in interface Service
Overrides:
start in class ConfigurableServicePartition

stop

public void stop()
          throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service other than mere data collections should stop
Specified by:
stop in interface Service
Overrides:
stop in class ConfigurableServicePartition

destroy

public void destroy()
             throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service is eventually destroyed. Convenience implementation.
Specified by:
destroy in interface Service
Overrides:
destroy in class ConfigurableServicePartition

initInterceptors

public void initInterceptors()
                      throws java.lang.Exception
Invoke init on all of the interceptors in this container.

startInterceptors

public void startInterceptors()
                       throws java.lang.Exception
Invoke start on all of the interceptors in this container.

stopInterceptors

public void stopInterceptors()
                      throws java.lang.Exception
Invoke stop on all of the interceptors in this container.

destroyInterceptors

public void destroyInterceptors()
                         throws java.lang.Exception
Invoke destroy on all of the interceptors in this container.

createInvokerInterceptor

public Interceptor createInvokerInterceptor()

persistEJBXML

public void persistEJBXML()
                   throws java.rmi.RemoteException
Specified by:
persistEJBXML in interface EJBContainerMBean

persistJRunEJBXML

public void persistJRunEJBXML()
                       throws java.rmi.RemoteException
Specified by:
persistJRunEJBXML in interface EJBContainerMBean


Copyright � 2002 Macromedia Corporation. All Rights Reserved.