org.openejb.core.ivm
Class IntraVmServer

java.lang.Object
  extended by org.openejb.core.ivm.IntraVmServer
All Implemented Interfaces:
ApplicationServer

public class IntraVmServer
extends java.lang.Object
implements ApplicationServer

REMOTE to LOCAL SERIALIZATION

Definition:

This is a serialization that initiates in a remote client vm and finishes in same vm as OpenEJB and the Application Server.

Circumstances:

When a remote ApplicationServer-specific implementation of a javax.ejb.* interface is serialized outside the scope of the remote client vm and deserializes in the Application Server and OpenEJB IntraVM Server's vm.

These serializations happen, for example, when javax.ejb.* objects are used as parameters to an EJBObject method either directly or nested in another object.

Action:

No special action is required by the OpenEJB specification.

Notes on Optimization:

For optimization purposes, the ApplicationServer can replace its javax.ejb.* interface implementations with those created by the IntraVM Server via the IntraVM's own implementation of the org.openejb.spi.ApplicationServer interface.

The Application Server may wish to this by implementing the serialization readResolve method in it's javax.ejb.* implementations. Then, when these implementations are deserialized, certain checks can be made to determine if they in the same VM as the Application Server and OpenEJB IntraVM Server. If they are, it can replace itself with the equivalent IntraVM Server implementation. An easy way for an implementation to determine which VM it is in is to simply set a system variable that is only present in the Application Server's VM.

This is identical to how the IntraVM Server replaces its javax.ejb.* interface implementations with those created by the ApplicationServer when objects are leaving the local VM.

Version:
$Revision: 1096 $ $Date: 2004-03-26 13:41:16 -0800 (Fri, 26 Mar 2004) $
Author:
David Blevins

Constructor Summary
IntraVmServer()
           
 
Method Summary
 javax.ejb.EJBHome getEJBHome(ProxyInfo pi)
           
 javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo pi)
           
 javax.ejb.EJBObject getEJBObject(ProxyInfo pi)
           
 javax.ejb.Handle getHandle(ProxyInfo pi)
           
 javax.ejb.HomeHandle getHomeHandle(ProxyInfo pi)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntraVmServer

public IntraVmServer()
Method Detail

getEJBMetaData

public javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo pi)
Specified by:
getEJBMetaData in interface ApplicationServer

getHandle

public javax.ejb.Handle getHandle(ProxyInfo pi)
Specified by:
getHandle in interface ApplicationServer

getHomeHandle

public javax.ejb.HomeHandle getHomeHandle(ProxyInfo pi)
Specified by:
getHomeHandle in interface ApplicationServer

getEJBObject

public javax.ejb.EJBObject getEJBObject(ProxyInfo pi)
Specified by:
getEJBObject in interface ApplicationServer

getEJBHome

public javax.ejb.EJBHome getEJBHome(ProxyInfo pi)
Specified by:
getEJBHome in interface ApplicationServer


Copyright © 1999-2011 OpenEJB. All Rights Reserved.