jrun.ejb
Class EntityContainer

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

public class EntityContainer
extends ClientInvokableContainer

The entity EJB container subclass.

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

Fields inherited from class jrun.ejb.ClientInvokableContainer
ejbHomeProxy, ejbLocalHomeProxy, homeMethodMap, rmiBroker
 
Fields inherited from class jrun.ejb.EJBContainer
instancePool, invoker, jsm, LOCAL, OBJECT_NAME, objectMethodMap, persistenceStore, 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
EntityContainer()
           
 
Method Summary
 void cacheThreadLocal(java.lang.Object id, Instance instance)
           
 java.lang.Object createHome(EJBInvocation ejbInvocation)
           
 void destroy()
          Every service is eventually destroyed.
 void expungeThreadLocal(java.lang.Object id)
           
 java.lang.Object findByPrimaryKey(EJBInvocation ejbInvocation)
           
 javax.ejb.EJBMetaData getEJBMetaDataHome(EJBInvocation ejbInvocation)
           
 EntityPersistenceManager getEntityPersistenceManager()
           
 InstanceCache getInstanceCache()
           
 java.lang.Object getPrimaryKey(EJBInvocation ejbInvocation)
           
 java.util.Map getThreadLocalCache()
           
 void init()
          Not every service needs to init, implement it out of convenience.
protected  void mapHomeMethods(java.lang.reflect.Method[] method)
           
protected  void mapObjectMethods(java.lang.reflect.Method[] method)
           
 java.lang.Object multiFind(EJBInvocation ejbInvocation)
           
 void remove(EJBInvocation ejbInvocation)
          This method gets invoked when the client calls remove(...) on the EJB's remote or local interface.
protected  void remove(Instance instance)
          This method gets invoked by "public remove()" and by CMP20EntityContainer.cascadeDelete().
 void removeHome(EJBInvocation ejbInvocation)
          This method gets invoked when the client calls remove(Handle) or remove(Object) on the EJB's home interface.
 void setEntityPersistenceManager(EntityPersistenceManager entityPersistenceManager)
           
 void setInstanceCache(InstanceCache instancCache)
           
 java.lang.Object singleFind(EJBInvocation ejbInvocation)
           
 void start()
          Every service other than mere data collections should start
 void stop()
          Every service other than mere data collections should stop
 void unsetContext(Instance instance)
           
 
Methods inherited from class jrun.ejb.ClientInvokableContainer
getEJBHome, getEJBLocalHome, getHomeClass, getHomeHandleHome, getHomeMethodMap, getIdFromHandle, getLocalClass, getLocalHomeClass, getRemoteClass, getRmiBroker, getRoleLink, invokeHomeMethod, isIIOP, isLocal, isLocalInvocation, isRemote, setIIOP, setJNDIName, setRmiBroker
 
Methods inherited from class jrun.ejb.EJBContainer
createInvokerInterceptor, destroyInterceptors, getBeanClass, getDescription, getDisplayName, getEJBMetaData, getEJBModuleName, getHandle, getInstancePool, getJNDIName, getMethodPermissions, getObjectMethodMap, getPersistenceStore, getSecurityManager, getTransactionManager, initInterceptors, invokeObjectMethod, isIdentical, persistEJBXML, persistJRunEJBXML, setEJBMetaData, setEJBModuleName, setInstancePool, setPersistenceStore, setSecurityManager, setTransactionManager, startInterceptors, stopInterceptors
 
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
 

Constructor Detail

EntityContainer

public EntityContainer()
                throws java.lang.Exception
Method Detail

cacheThreadLocal

public void cacheThreadLocal(java.lang.Object id,
                             Instance instance)

expungeThreadLocal

public void expungeThreadLocal(java.lang.Object id)

getThreadLocalCache

public java.util.Map getThreadLocalCache()

init

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

start

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

stop

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

destroy

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

mapHomeMethods

protected void mapHomeMethods(java.lang.reflect.Method[] method)
Overrides:
mapHomeMethods in class ClientInvokableContainer

mapObjectMethods

protected void mapObjectMethods(java.lang.reflect.Method[] method)
                         throws java.lang.NoSuchMethodException
Overrides:
mapObjectMethods in class ClientInvokableContainer

getInstanceCache

public InstanceCache getInstanceCache()

setInstanceCache

public void setInstanceCache(InstanceCache instancCache)

getEntityPersistenceManager

public EntityPersistenceManager getEntityPersistenceManager()

setEntityPersistenceManager

public void setEntityPersistenceManager(EntityPersistenceManager entityPersistenceManager)

createHome

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

findByPrimaryKey

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

getEJBMetaDataHome

public javax.ejb.EJBMetaData getEJBMetaDataHome(EJBInvocation ejbInvocation)
                                         throws java.rmi.RemoteException

getPrimaryKey

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

multiFind

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

remove

public void remove(EJBInvocation ejbInvocation)
            throws java.rmi.RemoteException,
                   javax.ejb.RemoveException
This method gets invoked when the client calls remove(...) on the EJB's remote or local interface. The method, removeHome(EJBInvocation), also calls this method.

remove

protected void remove(Instance instance)
               throws java.rmi.RemoteException,
                      javax.ejb.RemoveException
This method gets invoked by "public remove()" and by CMP20EntityContainer.cascadeDelete().

removeHome

public void removeHome(EJBInvocation ejbInvocation)
                throws java.rmi.RemoteException,
                       javax.ejb.RemoveException
This method gets invoked when the client calls remove(Handle) or remove(Object) on the EJB's home interface.

singleFind

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

unsetContext

public void unsetContext(Instance instance)


Copyright � 2002 Macromedia Corporation. All Rights Reserved.