org.openejb.spi
Interface ApplicationServer

All Known Implementing Classes:
EjbDaemon, IntraVmServer, ServerFederation

public interface ApplicationServer

LOCAL to REMOTE SERIALIZATION

Definition:

This is a serialization that initiates in the local vm, but is outside the scope of a marked IntraVM local serialization.

Circumstances:

When an IntraVM implementation of a javax.ejb.* interface is serialized outside the scope of the IntraVM Server

These serializations happen when objects are sent from a local bean to a remote client as part of a return value, or when a stateful session bean is passified.

Action:

Don't serialize the IntraVM javax.ejb.* interface implementation, instead ask the ApplicationServer to nominate its own implementation as a replacement. This is done via the org.openejb.spi.ApplicationServer interface.

Example Scenario:

SERIALIZATION

1. ObjectOutputStream encounters an IntraVmMetaData instance in the object graph and calls its writeReplace method.
2. The IntraVmMetaData instance determines it is being serialized outside the scope of an IntraVM serialization by calling IntraVmCopyMonitor.isIntraVmCopyOperation().
3. The IntraVmMetaData instance calls the getEJBMetaData method on the ApplicationServer.
4. The IntraVmMetaData instance returns the ApplicationServer's EJBMetaData instance from the writeReplace method.
5. The ObjectOutputStream serializes the ApplicationServer's EJBMetaData instance in place of the IntraVmMetaData instance.

Note: The ApplicationServer's EJBMetaData instance can be any object that implements the javax.ejb.EJBMetaData interface and can also implement any serialization methods, such as the writeReplace method, to nominate a replacement or implement protocol specific logic or otherwise gain control over the serialization of EJBMetaData instances destined for its remote clients.

DESERIALIZATION

The deserialization of the Application Server's javax.ejb.* implementations is implementation specific.

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

Method Summary
 javax.ejb.EJBHome getEJBHome(ProxyInfo proxyInfo)
           
 javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo proxyInfo)
           
 javax.ejb.EJBObject getEJBObject(ProxyInfo proxyInfo)
           
 javax.ejb.Handle getHandle(ProxyInfo proxyInfo)
           
 javax.ejb.HomeHandle getHomeHandle(ProxyInfo proxyInfo)
           
 

Method Detail

getEJBMetaData

javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo proxyInfo)

getHandle

javax.ejb.Handle getHandle(ProxyInfo proxyInfo)

getHomeHandle

javax.ejb.HomeHandle getHomeHandle(ProxyInfo proxyInfo)

getEJBObject

javax.ejb.EJBObject getEJBObject(ProxyInfo proxyInfo)

getEJBHome

javax.ejb.EJBHome getEJBHome(ProxyInfo proxyInfo)


Copyright © 1999-2011 OpenEJB. All Rights Reserved.