org.globus.ogsa.impl.core.factory
Class EJBFactoryCallback

java.lang.Object
  extended byorg.globus.ogsa.impl.core.factory.EJBFactoryCallback
All Implemented Interfaces:
FactoryCallback

public class EJBFactoryCallback
extends java.lang.Object
implements FactoryCallback

This class looks up an EJB using parameters from the server-config.wsdd file. It instantiates the delegation skeleton created by EJBServiceBuilder.

Author:
Rob Seed

Nested Class Summary
protected static class EJBFactoryCallback.CreateInfo
           
 
Field Summary
protected  java.util.HashMap createMethodMap
          Map from jndiName to CreateInfo - A static inner class that stores the type of ejb and its create/find method
 
Constructor Summary
EJBFactoryCallback()
           
 
Method Summary
protected  EJBFactoryCallback.CreateInfo cacheCreateMethod(javax.ejb.EJBHome home, java.lang.String jndiName)
          Figures out if the ejb is a session or entity bean and enters the proper create or find method in the cache.
protected  java.lang.Object convertStringToPrimaryKey(java.lang.String pkString, java.lang.Class pkClass)
           
 GridServiceBase createServiceObject(ExtensibilityType extensibility, ExtensibilityTypeHolder extensibilityOutput)
          creates a new Grid service instance that implements the GridServiceBase interface
protected  javax.ejb.EJBObject getRemote(javax.ejb.EJBHome home, ExtensibilityType extensibility)
          Subclasses can override this to use a different create or find method, maybe depending on parameters in the ExtensibilityType
 void initialize(GridServiceBase base)
          associates this object with its GridServiceBase service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

createMethodMap

protected java.util.HashMap createMethodMap
Map from jndiName to CreateInfo - A static inner class that stores the type of ejb and its create/find method

Constructor Detail

EJBFactoryCallback

public EJBFactoryCallback()
Method Detail

getRemote

protected javax.ejb.EJBObject getRemote(javax.ejb.EJBHome home,
                                        ExtensibilityType extensibility)
Subclasses can override this to use a different create or find method, maybe depending on parameters in the ExtensibilityType


cacheCreateMethod

protected EJBFactoryCallback.CreateInfo cacheCreateMethod(javax.ejb.EJBHome home,
                                                          java.lang.String jndiName)
                                                   throws java.rmi.RemoteException,
                                                          java.lang.NoSuchMethodException
Figures out if the ejb is a session or entity bean and enters the proper create or find method in the cache.

Throws:
java.rmi.RemoteException
java.lang.NoSuchMethodException

convertStringToPrimaryKey

protected java.lang.Object convertStringToPrimaryKey(java.lang.String pkString,
                                                     java.lang.Class pkClass)

initialize

public void initialize(GridServiceBase base)
                throws GridServiceException
Description copied from interface: FactoryCallback
associates this object with its GridServiceBase service. This method is called when the first instance creation is requested.

Specified by:
initialize in interface FactoryCallback
Parameters:
base - factory service that this factory callback should create services for
Throws:
GridServiceException - if the callback object could not be initialized

createServiceObject

public GridServiceBase createServiceObject(ExtensibilityType extensibility,
                                           ExtensibilityTypeHolder extensibilityOutput)
                                    throws GridServiceException
Description copied from interface: FactoryCallback
creates a new Grid service instance that implements the GridServiceBase interface

Specified by:
createServiceObject in interface FactoryCallback
Parameters:
extensibility - parameters the client may pass to the factory at creation time
Throws:
GridServiceException - if the service instance could not be created


Copyright ? 1999 University of Chicago and The University of Southern California. All Rights Reserved.