org.openejb.server
Class ServerFederation

java.lang.Object
  extended by org.openejb.server.ServerFederation
All Implemented Interfaces:
ApplicationServer

public class ServerFederation
extends java.lang.Object
implements ApplicationServer

This class is passed in as the ApplicationServer implementation when OpenEJB is initialized. This class allows several application server implementations to be used on the same contianer system Each one calls setApplicationServer before making a call to OpenEJB. Then, when OpenEJB eventually makes a call to the ApplicationServer implementation, which is this object, we can actually delegate the call to the real application server. This allows us to have several ApplicationServer implamentations all using the same OpenEJB instance at the same time, whereas we would normally be limited to one.

Author:
David Blevins

Constructor Summary
ServerFederation()
           
 
Method Summary
static ApplicationServer getApplicationServer()
          Gets the ApplicationServer implementation associates with this thread.
 javax.ejb.EJBHome getEJBHome(ProxyInfo proxyInfo)
          Delegates this call to the application server implementation associated with this thread.
 javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo proxyInfo)
          Delegates this call to the application server implementation associated with this thread.
 javax.ejb.EJBObject getEJBObject(ProxyInfo proxyInfo)
          Delegates this call to the application server implementation associated with this thread.
 javax.ejb.Handle getHandle(ProxyInfo proxyInfo)
          Delegates this call to the application server implementation associated with this thread.
 javax.ejb.HomeHandle getHomeHandle(ProxyInfo proxyInfo)
          Delegates this call to the application server implementation associated with this thread.
static void setApplicationServer(ApplicationServer server)
          Makes the ApplicationServer implementation specified the one that will be used for all actions on this thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerFederation

public ServerFederation()
Method Detail

getHandle

public javax.ejb.Handle getHandle(ProxyInfo proxyInfo)
Delegates this call to the application server implementation associated with this thread.

Specified by:
getHandle in interface ApplicationServer
Parameters:
proxyInfo - A proxy info instance describing the deployment
Returns:
Handle

getEJBMetaData

public javax.ejb.EJBMetaData getEJBMetaData(ProxyInfo proxyInfo)
Delegates this call to the application server implementation associated with this thread.

Specified by:
getEJBMetaData in interface ApplicationServer
Parameters:
proxyInfo - A proxy info instance describing the deployment
Returns:
EJBMetaData

getHomeHandle

public javax.ejb.HomeHandle getHomeHandle(ProxyInfo proxyInfo)
Delegates this call to the application server implementation associated with this thread.

Specified by:
getHomeHandle in interface ApplicationServer
Parameters:
proxyInfo - A proxy info instance describing the deployment
Returns:
HomeHandle

getEJBObject

public javax.ejb.EJBObject getEJBObject(ProxyInfo proxyInfo)
Delegates this call to the application server implementation associated with this thread.

Specified by:
getEJBObject in interface ApplicationServer
Parameters:
proxyInfo - A proxy info instance describing the deployment
Returns:
EJBObject

getEJBHome

public javax.ejb.EJBHome getEJBHome(ProxyInfo proxyInfo)
Delegates this call to the application server implementation associated with this thread.

Specified by:
getEJBHome in interface ApplicationServer
Parameters:
proxyInfo - A proxy info instance describing the deployment
Returns:
EJBHome

setApplicationServer

public static void setApplicationServer(ApplicationServer server)
Makes the ApplicationServer implementation specified the one that will be used for all actions on this thread.

Parameters:
server -

getApplicationServer

public static ApplicationServer getApplicationServer()
Gets the ApplicationServer implementation associates with this thread.

Returns:
ApplicationServer


Copyright © 1999-2011 OpenEJB. All Rights Reserved.