Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » ejb » [javadoc | source]
org.jboss.ejb
public class: EntityContainer [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.ejb.Container
            org.jboss.ejb.EntityContainer

All Implemented Interfaces:
    InstancePoolContainer, EntityContainerMBean, EJBProxyFactoryContainer, ContainerMBean, AllowedOperationsFlags, org.jboss.kernel.spi.dependency.KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

This is a Container for EntityBeans (both BMP and CMP).
Nested Class Summary:
class  EntityContainer.ContainerInterceptor  This is the last step before invocation - all interceptors are done 
Field Summary
protected  Map homeMapping    These are the mappings between the home interface methods and the container methods. 
protected  Map beanMapping    These are the mappings between the remote/local interface methods and the bean methods. 
protected  EntityPersistenceManager persistenceManager    This is the persistence manager for this container 
protected  InstanceCache instanceCache    This is the instance cache for this container 
protected  InstancePool instancePool    This is the instancepool that is to be used 
protected  Interceptor interceptor    This is the first interceptor in the chain. The last interceptor must be provided by the container itself. 
protected  boolean readOnly    readOnly determines if state can be written to resource manager. 
protected static  GlobalTxEntityMap globalTxEntityMap    This provides a way to find the entities that are part of a given transaction EntitySynchronizationInterceptor and InstanceSynchronization manage this instance. 
Fields inherited from org.jboss.ejb.Container:
BASE_EJB_CONTAINER_NAME,  ORB_NAME,  EJB_CONTAINER_QUERY_NAME,  EJBOBJECT_REMOVE,  EJB_TIMEOUT,  ejbModule,  classLoader,  webClassLoader,  metaData,  beanClass,  homeInterface,  remoteInterface,  localHomeInterface,  localInterface,  tm,  securityContextClassName,  defaultSecurityDomain,  securityManagement,  policyRegistration,  sm,  rm,  securityProxy,  lockManager,  localProxyFactory,  marshalledInvocationMapping,  proxyFactories,  proxyFactoryTL,  createCount,  removeCount,  invokeStats,  jaccContextID,  isJaccEnabled,  timerService
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Method from org.jboss.ejb.EntityContainer Summary:
addInterceptor,   checkCoherency,   createBeanClassInstance,   createContainerInterceptor,   createHome,   createLocalHome,   createService,   destroyService,   find,   findLocal,   flushCache,   getCacheSize,   getEJBHome,   getEJBLocalHome,   getEJBMetaDataHome,   getEJBObject,   getGlobalTxEntityMap,   getHandle,   getHomeClass,   getHomeHandleHome,   getInstanceCache,   getInstancePool,   getInterceptor,   getLocalProxyFactory,   getPersistenceManager,   getPrimaryKey,   getRemoteClass,   internalInvoke,   internalInvokeHome,   invokeEjbStore,   isIdentical,   isReadOnly,   postCreateHome,   postCreateLocalHome,   remove,   removeHome,   removeLocalHome,   resetStatistic,   retrieveStatistic,   setInstanceCache,   setInstancePool,   setPersistenceManager,   setupBeanMapping,   setupHomeMapping,   setupMarshalledInvocationMapping,   startService,   stopService,   storeEntity,   synchronizeEntitiesWithinTransaction
Methods from org.jboss.ejb.Container:
addInterceptor,   addProxyFactory,   cleanENC,   createBeanClassInstance,   createContainerInterceptor,   createService,   destroyService,   getBeanClass,   getBeanMetaData,   getClassLoader,   getCreateCount,   getDefaultSecurityDomain,   getDeploymentInfo,   getDeploymentUnit,   getEjbModule,   getEnvContext,   getHomeClass,   getInvokeStats,   getJaccContextID,   getJmxName,   getLocalClass,   getLocalHomeClass,   getLockManager,   getMessageDestination,   getMethodPermissions,   getPolicyRegistration,   getProxyFactory,   getRealmMapping,   getRemoteClass,   getRemoveCount,   getSecurityContextClassName,   getSecurityManagement,   getSecurityManager,   getSecurityProxy,   getTimerService,   getTimerService,   getTransactionManager,   getWebClassLoader,   internalInvoke,   internalInvokeHome,   invoke,   isCallByValue,   isJaccEnabled,   lookupProxyFactory,   popENC,   pushENC,   removeTimerService,   restoreTimers,   setBeanMetaData,   setClassLoader,   setDefaultSecurityDomain,   setDeploymentInfo,   setDeploymentUnit,   setEjbModule,   setJaccContextID,   setJaccEnabled,   setLockManager,   setPolicyRegistration,   setProxyFactory,   setRealmMapping,   setSecurityContextClassName,   setSecurityManagement,   setSecurityManager,   setSecurityProxy,   setTimerService,   setTransactionManager,   setWebClassLoader,   startService,   stopService
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.EntityContainer Detail:
 public  void addInterceptor(Interceptor in) 
 protected  void checkCoherency() throws Exception 
 public Object createBeanClassInstance() throws Exception 
    Returns a new instance of the bean class or a subclass of the bean class. If this is 1.x cmp, simply return a new instance of the bean class. If this is 2.x cmp, return a subclass that provides an implementation of the abstract accessors.
 Interceptor createContainerInterceptor() 
 public EJBObject createHome(Invocation mi) throws Exception 
    This method takes care of the wiring of the "EJBObject" trio (target, context, proxy). It delegates to the persistence manager.
 public EJBLocalObject createLocalHome(Invocation mi) throws Exception 
    Local home interface implementation
 protected  void createService() throws Exception 
 protected  void destroyService() throws Exception 
 public Object find(Invocation mi) throws Exception 
    This methods finds the target instances by delegating to the persistence manager It then manufactures EJBObject for all the involved instances found.
 public Object findLocal(Invocation mi) throws Exception 
 public  void flushCache() 
    Flush the cache
 public long getCacheSize() 
 public EJBHome getEJBHome(Invocation mi) throws RemoteException 
 public EJBLocalHome getEJBLocalHome(Invocation mi) 
    MF FIXME these are implemented on the client
 public EJBMetaData getEJBMetaDataHome(Invocation mi) throws RemoteException 
 public EJBObject getEJBObject(Invocation mi) throws RemoteException 
    A method for the getEJBObject from the handle
 public static GlobalTxEntityMap getGlobalTxEntityMap() 
 public Handle getHandle(Invocation mi) throws RemoteException 
 public Class getHomeClass() 
 public HomeHandle getHomeHandleHome(Invocation mi) throws RemoteException 
 public InstanceCache getInstanceCache() 
 public InstancePool getInstancePool() 
 public Interceptor getInterceptor() 
 public LocalProxyFactory getLocalProxyFactory() 
 public EntityPersistenceManager getPersistenceManager() 
 public Object getPrimaryKey(Invocation mi) throws RemoteException 
 public Class getRemoteClass() 
 public Object internalInvoke(Invocation mi) throws Exception 
 public Object internalInvokeHome(Invocation mi) throws Exception 
 public  void invokeEjbStore(EntityEnterpriseContext ctx) throws Exception 
    Invokes ejbStore method on the instance
 public boolean isIdentical(Invocation mi) throws RemoteException 
 public boolean isReadOnly() 
 public  void postCreateHome(Invocation mi) throws Exception 
    Delegates to the persistence manager postCreateEntityMethod.
 public  void postCreateLocalHome(Invocation mi) throws Exception 
    Delegates to the persistence manager postCreateEntityMethod.
 public  void remove(Invocation mi) throws RemoveException, RemoteException 
 public  void removeHome(Invocation mi) throws RemoveException, RemoteException 
 public  void removeLocalHome(Invocation mi) throws RemoveException, RemoteException 
 public  void resetStatistic() 
 public Map retrieveStatistic() 
 public  void setInstanceCache(InstanceCache ic) 
 public  void setInstancePool(InstancePool ip) 
 public  void setPersistenceManager(EntityPersistenceManager pm) 
 protected  void setupBeanMapping() throws Exception 
 protected  void setupHomeMapping() throws Exception 
 protected  void setupMarshalledInvocationMapping() throws Exception 
 protected  void startService() throws Exception 
 protected  void stopService() throws Exception 
 public  void storeEntity(EntityEnterpriseContext ctx) throws Exception 
    For CMP actually stores the instance
 public static  void synchronizeEntitiesWithinTransaction(Transaction tx) 
    Stores all of the entities associated with the specified transaction. As per the spec 9.6.4, entities must be synchronized with the datastore when an ejbFind is called. Also, all entities within entire transaction should be synchronized before a remove, otherwise there may be problems with 'cascade delete'.