org.apache.openejb.core.cmp
Class CmpContainer

java.lang.Object
  extended by org.apache.openejb.core.cmp.CmpContainer
All Implemented Interfaces:
Container, RpcContainer

public class CmpContainer
extends Object
implements RpcContainer


Field Summary
protected  CmpEngine cmpEngine
          The CmpEngine which performs the actual persistence operations
protected  Object containerID
           
protected  Map<Class,DeploymentInfo> deploymentsByClass
          When events are fired from the CMP engine only an entity bean instance is returned.
protected  Map<Object,DeploymentInfo> deploymentsById
          Index used for getDeployments() and getDeploymentInfo(deploymentId).
protected  EntrancyTracker entrancyTracker
          Tracks entity instances that have been "entered" so we can throw reentrancy exceptions.
protected  SecurityService securityService
           
protected  TransactionSynchronizationRegistry synchronizationRegistry
           
 
Constructor Summary
CmpContainer(Object id, TransactionManager transactionManager, SecurityService securityService, String cmpEngineFactory)
           
 
Method Summary
 void deploy(CoreDeploymentInfo deploymentInfo)
           
 void deploy(DeploymentInfo deploymentInfo)
           
 DeploymentInfo[] deployments()
           
 Object getContainerID()
           
 ContainerType getContainerType()
           
 DeploymentInfo getDeploymentInfo(Object deploymentID)
           
 Object getEjbInstance(CoreDeploymentInfo deployInfo, Object primaryKey)
           
 Object getEjbInstance(DeploymentInfo deployInfo, Object primaryKey)
           
 Object invoke(Object deployID, Class callInterface, Method callMethod, Object[] args, Object primKey)
           
 Object invoke(Object deployID, InterfaceType type, Class callInterface, Method callMethod, Object[] args, Object primKey)
           
 Object invoke(Object deployID, Method callMethod, Object[] args, Object primKey, Object securityIdentity)
          Deprecated. use invoke signature without 'securityIdentity' argument.
 Object select(DeploymentInfo di, String methodSignature, String returnType, Object... args)
           
 void undeploy(CoreDeploymentInfo deploymentInfo)
           
 void undeploy(DeploymentInfo deploymentInfo)
           
 int update(DeploymentInfo di, String methodSignature, Object... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

containerID

protected final Object containerID

securityService

protected final SecurityService securityService

deploymentsById

protected final Map<Object,DeploymentInfo> deploymentsById
Index used for getDeployments() and getDeploymentInfo(deploymentId).


deploymentsByClass

protected final Map<Class,DeploymentInfo> deploymentsByClass
When events are fired from the CMP engine only an entity bean instance is returned. The type of the bean is used to find the deployment info. This means that when the same type is used multiple ejb deployments a random deployment will be selected to handle the ejb callback.


cmpEngine

protected final CmpEngine cmpEngine
The CmpEngine which performs the actual persistence operations


entrancyTracker

protected EntrancyTracker entrancyTracker
Tracks entity instances that have been "entered" so we can throw reentrancy exceptions.


synchronizationRegistry

protected TransactionSynchronizationRegistry synchronizationRegistry
Constructor Detail

CmpContainer

public CmpContainer(Object id,
                    TransactionManager transactionManager,
                    SecurityService securityService,
                    String cmpEngineFactory)
             throws OpenEJBException
Throws:
OpenEJBException
Method Detail

getContainerID

public Object getContainerID()
Specified by:
getContainerID in interface Container

getContainerType

public ContainerType getContainerType()
Specified by:
getContainerType in interface Container

deployments

public DeploymentInfo[] deployments()
Specified by:
deployments in interface Container

getDeploymentInfo

public DeploymentInfo getDeploymentInfo(Object deploymentID)
Specified by:
getDeploymentInfo in interface Container

deploy

public void deploy(DeploymentInfo deploymentInfo)
            throws OpenEJBException
Specified by:
deploy in interface Container
Throws:
OpenEJBException

deploy

public void deploy(CoreDeploymentInfo deploymentInfo)
            throws OpenEJBException
Throws:
OpenEJBException

undeploy

public void undeploy(DeploymentInfo deploymentInfo)
              throws OpenEJBException
Specified by:
undeploy in interface Container
Throws:
OpenEJBException

undeploy

public void undeploy(CoreDeploymentInfo deploymentInfo)
              throws OpenEJBException
Throws:
OpenEJBException

getEjbInstance

public Object getEjbInstance(DeploymentInfo deployInfo,
                             Object primaryKey)

getEjbInstance

public Object getEjbInstance(CoreDeploymentInfo deployInfo,
                             Object primaryKey)

invoke

public Object invoke(Object deployID,
                     Method callMethod,
                     Object[] args,
                     Object primKey,
                     Object securityIdentity)
              throws OpenEJBException
Deprecated. use invoke signature without 'securityIdentity' argument.

Specified by:
invoke in interface RpcContainer
Throws:
OpenEJBException

invoke

public Object invoke(Object deployID,
                     Class callInterface,
                     Method callMethod,
                     Object[] args,
                     Object primKey)
              throws OpenEJBException
Specified by:
invoke in interface RpcContainer
Throws:
OpenEJBException

invoke

public Object invoke(Object deployID,
                     InterfaceType type,
                     Class callInterface,
                     Method callMethod,
                     Object[] args,
                     Object primKey)
              throws OpenEJBException
Specified by:
invoke in interface RpcContainer
Throws:
OpenEJBException

select

public Object select(DeploymentInfo di,
                     String methodSignature,
                     String returnType,
                     Object... args)
              throws javax.ejb.FinderException
Throws:
javax.ejb.FinderException

update

public int update(DeploymentInfo di,
                  String methodSignature,
                  Object... args)
           throws javax.ejb.FinderException
Throws:
javax.ejb.FinderException


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.