|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RpcContainer
The RpcContainer manages enterprise beans at runtime. The RpcContainer is responsible for interposing between the client and the EntepriseBean objects its manages. The RpcContainer applies transaction, security and persistence behavior as described the the deployment attributes for these services. The RpcContainer works closely with its ContainerManager to obtain references to the appropriate primary services.
A RpcContainer may managed one or more bean deployments of a particular kind (stateless, stateful, BMP and CMP entity). A Stateful container, for example, could manage all the one or more types (deployments) of stateful beans.
The Application Server (AS) will map each bean proxy (home and remote)to its container and deployment IDs, which are unique across the container system. The AS delivers client bean requests directly to the RpcContainer that is responsible for the invoked bean.
Business method requests as well as create, find, and remove requests are delivered directly to the container. Business methods are those methods defined in the bean's remote interface that are NOT already defined in the EJBObject interface. The container will respond with either a return value or an OpenEJBException type. Return values are the return values of the bean method (null if void) and must be returned by the bean stub. Exceptions are handled according to their type (see below).
Requests for a EJBHome and EJBObject references are managed by both the application server and the RpcContainer. The RpcContainer has specific methods for these requests that return a ProxyInfo object. The application server uses the ProxyInfo object returned by these methods to create a remote stub that resides on the client. The implementation of the remote stub is application server specific, but the ProxyInfo object provides the application server with helpful information including: The Remote interface to implement (EJBHome or EJBObject types), DeplymentInfo, primary key (stateful and entity only), and a reference to the container. This data is associated with the remote reference in an application sever specific way, and delivered with the Method and arguments to the RpcContainer each time the remote stub is invoked.
The invoke( ) method all performs access control checks while processing the requests. Access with out the proper permissions will result in a org.openejb.ApplicaitonException with a nest java.rmi.RemoteException (process this exception as described below).
The OpenEJBException is the standard exception thrown by all methods in all type in the RpcContainer Provider Interface (CPI). The OpenEJBException has 3 subtypes each serving a different purpose. The CPI will always thrown one of these subtype and never the OpenEJBException itself.
The default implementation of this interface is provided by the org.openejb.core.stateful.StatefulContainer, org.openejb.core.stateless.StatelessContainer, and org.openejb.core.entity.EntityContainer.
StatefulContainer
,
StatelessContainer
,
EntityContainer
,
ProxyInfo
Field Summary |
---|
Fields inherited from interface org.openejb.Container |
---|
ENTITY, MESSAGE_DRIVEN, STATEFUL, STATELESS |
Method Summary | |
---|---|
java.lang.Object |
invoke(java.lang.Object deployID,
java.lang.reflect.Method callMethod,
java.lang.Object[] args,
java.lang.Object primKey,
java.lang.Object securityIdentity)
Invokes a method on an instance of the specified bean deployment. |
Methods inherited from interface org.openejb.Container |
---|
deploy, deployments, getContainerID, getContainerType, getDeploymentInfo, init |
Method Detail |
---|
java.lang.Object invoke(java.lang.Object deployID, java.lang.reflect.Method callMethod, java.lang.Object[] args, java.lang.Object primKey, java.lang.Object securityIdentity) throws OpenEJBException
deployID
- the dployment id of the bean deploymentcallMethod
- the method to be called on the bean instanceargs
- the arguments to use when invoking the specified methodprimKey
- the primary key class of the bean or null if the bean does not need a primary keysecurityIdentity
- identity
OpenEJBException
StatefulContainer.invoke
,
StatelessContainer.invoke
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |