Package org.openejb.core.ivm

The IntraVM server.

See:
          Description

Interface Summary
IntraVmProxy All proxies that are created for IntraVM EJBObject and EJBHome implementations must implement this interface.
 

Class Summary
BaseEjbProxyHandler This InvocationHandler and its proxy are serializable and can be used by HomeHandle, Handle, and MetaData to persist and revive handles.
EjbHomeProxyHandler This is an InvocationHandler that is used only for handling requests from an EJBHome stub.
EjbObjectProxyHandler This InvocationHandler and its proxy are serializable and can be used by HomeHandle, Handle, and MetaData to persist and revive handles.
IntraVmArtifact This class represents all artifacts of the IntraVM in a stream.
IntraVmCopyMonitor This class is used to demarcate intra-VM copy operations so that intra-VM artifacts such as IntraVmHandle, IntraVmMetaData, and BaseEjbProxyHandlers (EjbHomeProxyHandler and EjbObjectProxyHandler) can know when they should replace themselves during serialization with an IntraVmArtifact or a application server specific artifact.
IntraVmHandle IntraVM implementation of the interface javax.ejb.Handle
IntraVmMetaData IntraVM server implementation of the javax.ejb.EJBMetaData interface.
IntraVmServer REMOTE to LOCAL SERIALIZATION
SpecialProxyInfo Business methods that return EJBHome or EJBObject references to local beans (beans in the same container system) must have the return value converted to a ProxyInfo object so that the server can provide the client with a proper remote reference.
 

Package org.openejb.core.ivm Description

The IntraVM server. Allows for interaction among beans in the same virtual machine while respecting the remote semantics required by EJB.


   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. org.openejb.ri.server.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, Container, DeploymentInfo


Copyright © 1999-2011 OpenEJB. All Rights Reserved.