org.glassfish.enterprise.iiop.impl
Class POARemoteReferenceFactory

java.lang.Object
  extended by org.omg.CORBA.LocalObject
      extended by org.glassfish.enterprise.iiop.impl.POARemoteReferenceFactory
All Implemented Interfaces:
java.io.Serializable, RemoteReferenceFactory, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity, org.omg.PortableServer.ServantLocator, org.omg.PortableServer.ServantLocatorOperations, org.omg.PortableServer.ServantManager, org.omg.PortableServer.ServantManagerOperations

public final class POARemoteReferenceFactory
extends org.omg.CORBA.LocalObject
implements RemoteReferenceFactory, org.omg.PortableServer.ServantLocator

This class implements the RemoteReferenceFactory interface for the RMI/IIOP ORB with POA (Portable Object Adapter). There is one instance of the POARemoteReferenceFactory for each EJB type. It also implements the preinvoke/postinvoke APIs in the POA's ServantLocator interface, which are called before/after every invocation (local or remote). It creates a RMI-IIOP-POA object reference (a stub) for every EJBObject and EJBHome in the EJB container.

Author:
Kenneth Saks
See Also:
Serialized Form

Method Summary
 void cleanupClass(java.lang.Class clazz)
           
 java.rmi.Remote createHomeReference(byte[] homeKey)
           
 java.rmi.Remote createRemoteReference(byte[] instanceKey)
           
 void destroy()
           
 void destroyReference(java.rmi.Remote remoteRef, java.rmi.Remote remoteObj)
          Disconnect an EJBObject or EJBHome from the ORB.
 int getCSIv2PolicyType()
           
 boolean hasSameContainerID(org.omg.CORBA.Object obj)
           
 void postinvoke(byte[] ejbKey, org.omg.PortableServer.POA adapter, java.lang.String operation, java.lang.Object cookie, org.omg.PortableServer.Servant servant)
           
 org.omg.PortableServer.Servant preinvoke(byte[] ejbKey, org.omg.PortableServer.POA adapter, java.lang.String operation, org.omg.PortableServer.ServantLocatorPackage.CookieHolder cookieHolder)
          This is the implementation of ServantLocator.preinvoke() It is called from the POA before every remote invocation.
 void setRepositoryIds(java.lang.Class homeIntf, java.lang.Class remoteIntf)
           
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Method Detail

getCSIv2PolicyType

public int getCSIv2PolicyType()
Specified by:
getCSIv2PolicyType in interface RemoteReferenceFactory

setRepositoryIds

public void setRepositoryIds(java.lang.Class homeIntf,
                             java.lang.Class remoteIntf)
Specified by:
setRepositoryIds in interface RemoteReferenceFactory

cleanupClass

public void cleanupClass(java.lang.Class clazz)
Specified by:
cleanupClass in interface RemoteReferenceFactory

createRemoteReference

public java.rmi.Remote createRemoteReference(byte[] instanceKey)
Specified by:
createRemoteReference in interface RemoteReferenceFactory

createHomeReference

public java.rmi.Remote createHomeReference(byte[] homeKey)
Specified by:
createHomeReference in interface RemoteReferenceFactory

destroyReference

public void destroyReference(java.rmi.Remote remoteRef,
                             java.rmi.Remote remoteObj)
Disconnect an EJBObject or EJBHome from the ORB.

Specified by:
destroyReference in interface RemoteReferenceFactory

preinvoke

public org.omg.PortableServer.Servant preinvoke(byte[] ejbKey,
                                                org.omg.PortableServer.POA adapter,
                                                java.lang.String operation,
                                                org.omg.PortableServer.ServantLocatorPackage.CookieHolder cookieHolder)
                                         throws org.omg.PortableServer.ForwardRequest
This is the implementation of ServantLocator.preinvoke() It is called from the POA before every remote invocation. Return a POA Servant (which is the RMI/IIOP Tie for EJBObject/EJBHome).

Specified by:
preinvoke in interface org.omg.PortableServer.ServantLocatorOperations
Parameters:
ejbKey -
cookieHolder -
Throws:
org.omg.PortableServer.ForwardRequest

postinvoke

public void postinvoke(byte[] ejbKey,
                       org.omg.PortableServer.POA adapter,
                       java.lang.String operation,
                       java.lang.Object cookie,
                       org.omg.PortableServer.Servant servant)
Specified by:
postinvoke in interface org.omg.PortableServer.ServantLocatorOperations

destroy

public void destroy()
Specified by:
destroy in interface RemoteReferenceFactory

hasSameContainerID

public boolean hasSameContainerID(org.omg.CORBA.Object obj)
                           throws java.lang.Exception
Specified by:
hasSameContainerID in interface RemoteReferenceFactory
Throws:
java.lang.Exception


Copyright © 2012 GlassFish Community. All Rights Reserved.