Package org.openejb.ri.server


   There are two servers in OpenEJB
    The Reference Implementation (RI) Server
Interface Summary
DynamicContext  
 

Class Summary
AuthenticationRequest  
ClientIdentity The unique identity of the client application that invoked the method.
EjbHomeIntfcProcessor Represents the EJB Server's responsibility in handling the finder and create methods that are declared in the bean's home interface.
EjbHomeProcessor Represents the EJB Server's responsibility in handling methods that are declared in the javax.ejb.EJBHome interface.
EjbObjectProcessor Represents the EJB Server's responsibility in handling methods that are declared in the javax.ejb.EJBObject interface.
EjbProxyHandler This InvocationHandler and its proxy are serializable and can be used by HomeHandle, Handle, and MetaData to persist and revive handles.
EjbRemoteIntfcProcessor Represents the EJB Server's responsibility in handling the business methods methods that are declared in the bean's remote interface.
MethodInvocation This object is used to uniqly identify a method invocation within on an EJBObject or EJBHome reference is created.
NamingServer  
RiBaseHandle  
RiBinding  
RiClassLoader Dynamic ClassLoader that loads classes from the NamingServer.
RiContext The initial Context implementation that is returned from the client's first JNDI lookup.
RiInitCtxFactory Invoked by client-side JNDI lookup.
RiMetaData  
RiNameParser  
RPCMessage  
Server  
 

Package org.openejb.ri.server Description


   There are two servers in OpenEJB
  1. The Reference Implementation (RI) Server
    • All communication with clients/beans is remote, over a network, distributed and done with sockets.
    • Has a network based JNDI naming server.
    • Method invocation process = Client/Bean > Proxy > Handler > method & arguments are serialized > Ri Server > Container > Ri Server > return value is serialized > Handler > Proxy > Client/Bean.
    • It is for reference only and not intended for production use.

  2. The IntraVM Server
    • All communication with clients/beans is local, in the same computer, in the same VM, and done using thread-specific storage.
    • Has a thread-based JNDI naming server.
    • Method invocation process = Client/Bean > Proxy > Handler > arguments are copied > Container > return value is copied > Handler > Proxy > Client/Bean.
    • It is a core part of the container system and required by the EJB spec that all same-vm calls be treaded like they remote.



   Proxy Handlers for each server are as follows
  1. The Reference Implementation (RI) Server
    1. EjbProxyHandler
      • Serialized and sent along with a Proxy to serve as an EJBHome or EJBObject to a remote client/bean in the network.
      • Handles method invocations by serializing them and sending them over the network to the Ri Server.
      • Thread-Based, the RI Server dedicates a new thread to each EjbProxyHandler it returns to the client. Method invocations received by the RI Server from the Proxy and EjbProxyHandler are executed on the container in the handler's dedicated thread.

  2. The IntraVM Server
    1. EjbHomeProxyHandler (subclass of BaseEjbProxyHandler)
      • Instantiated and sent along with a Proxy to serve as an EJBHome to a local client/bean in the same VM.
      • Handles method invocations by copying the arguments and passing them directly to the container.
      • Not Thread-Based, only one EjbHomeProxyHandler is needed per/bean-deployment.
    2. EjbObjectProxyHandler (subclass of BaseEjbProxyHandler)
      • Instantiated and sent along with a Proxy to serve as an EJBObject to a local client/bean in the same VM.
      • Handles method invocations by copying the arguments and passing them directly to the container.
      • Thread-Based, one EjbHomeProxyHandler is needed for each EJBObject created.


Package Specification

OpenEJB Specification

Related Documentation

See Also:
ContainerSystem, org.openejb.core.ContainerManager, org.openejb.core.Container, DeploymentInfo