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

java.lang.Object
  extended byorg.globus.ogsa.impl.core.service.ServicePropertiesImpl
      extended byorg.globus.ogsa.impl.ogsi.GridServiceImpl
          extended byorg.globus.ogsa.impl.core.factory.EJBHomeFactoryProvider
All Implemented Interfaces:
FactoryCallback, GridService, GridServiceBase, GridServiceCallback, java.rmi.Remote, ServiceDataValueCallback, ServiceProperties

public abstract class EJBHomeFactoryProvider
extends GridServiceImpl
implements FactoryCallback

This is the base class of EJB Home Services. They expose any method on the home interface that returns a single instance of the remote interface. (all of the create and find methods that don't return enumerations)


Field Summary
protected  ServiceNode factoryNode
           
protected  javax.ejb.EJBHome home
           
 
Fields inherited from class org.globus.ogsa.impl.ogsi.GridServiceImpl
queryEngine, serviceData
 
Fields inherited from interface org.globus.ogsa.ServiceProperties
ACTIVATE_ON_STARTUP, ACTIVATION, BASE_CLASS_NAME, BOOTSTRAP, CONFIG_PATH, CONTAINS_REFERENCE, CREATION_EXTENSIBILITY, CREATION_EXTENSIBILITY_OUTPUT, CUSTOM_EXTENSIBILITY_DESERIALIZER, CUSTOM_EXTENSIBILITY_SERIALIZER, CUSTOM_MAPPING_REGISTERED, DEACTIVATED_PERSISTENT, DEACTIVATED_STATE, DEACTIVATED_TRANSIENT, DEACTIVATION, DESTROY_LISTENER, DESTRUCTION_SKELETON, DISABLE_FACTORY_REGISTRY, ENDPOINT, ENTRY_INSTANCE_CREATION, FACTORY, FACTORY_CALLBACK, FACTORY_HANDLE, FACTORY_PROVIDER, FACTORY_REGISTRY, GSR_DESCRIPTION, HANDLE, HANDLE_PORT, HANDLE_PROTOCOL, INSTANCE_CLASS, INSTANCE_DEACTIVATION, INSTANCE_GSR_DESCRIPTION, INSTANCE_LIFECYCLE, INSTANCE_PORT_TYPE, INSTANCE_PORT_TYPE_NS, INSTANCE_PREFIX, INSTANCE_REGISTRY, INSTANCE_SCHEMA_PATH, INSTANCE_WSDL, INTERFACE_CLASS_NAME, INVOCATION_ID, LAZY_CREATION, LIFECYCLE, LIFECYCLE_MONITOR, LIFECYCLE_MONITOR_CLASS, NAME, NOTIFICATION_ENGINE, NOTIFICATION_FACTORY, NOTIFICATION_SOURCE, OPERATION_PROVIDERS, PERSISTENT, PERSISTENT_PROPERTIES, PORT, PORT_TYPE, PORT_TYPE_NS, PRIMARY_KEY, PROTOCOL, QUERY_ENGINE, REDIRECT_RESOLVER, REGISTRY, RESOLVER_CACHE, ROUTER_HEADER, ROUTER_VIA, SCHEMA_LOCATION, SCHEMA_PATH, SERVICE_ACTIVATOR, SERVICE_DATA, SERVICE_DEPLOYMENT, SERVICE_GROUP_ENTRY, SERVICE_GROUP_PROVIDER, SERVICE_LOADER, SERVICE_NODE, SERVICE_PATH, SINK_ID, STARTUP_STATE, SWEEP_SERVICE_DATA, TIMEOUT, TIMESTAMP, TRANSIENT, TYPE, USER, WEBSTART_PANEL_NAME, WEBSTART_URL, WSDL
 
Constructor Summary
EJBHomeFactoryProvider(java.lang.String name, javax.ejb.EJBHome _home, javax.ejb.EJBObject ignoredParam)
           
 
Method Summary
static java.lang.String cleanString(java.lang.String s, int maxLen)
          Removes everything but letters and numbers from a string.
 java.lang.String createRemoteService(EJBServiceImpl skel, java.lang.String nameClue)
          This method sets the skeleton that will be returned by createServiceObject().
 GridServiceBase createServiceObject(ExtensibilityType creation, ExtensibilityTypeHolder extensibilityOutput)
          creates a new Grid service instance that implements the GridServiceBase interface
protected  ExtensibilityType getCreationType(javax.ejb.EJBObject remote, java.lang.String nameClue)
          This attempts to guess a good name for the "path" portion of the service's url
 void initialize(GridServiceBase base)
          associates this object with its GridServiceBase service.
 void preCreate(GridServiceBase base)
          Called when a service object is created.
 
Methods inherited from class org.globus.ogsa.impl.ogsi.GridServiceImpl
activate, addOperationProvider, deactivate, destroy, findServiceData, getInstanceProperty, getOperationProvider, getQueryEngine, getServiceDataSet, getServiceDataValues, getServiceInterface, getTerminationTime, populateInstanceProperties, postCreate, preDestroy, removeOperationProvider, requestTerminationAfter, requestTerminationBefore, setDefaultTermination, setQueryEngine, setServiceData, setServiceDataSet
 
Methods inherited from class org.globus.ogsa.impl.core.service.ServicePropertiesImpl
flush, flush, getPersistentProperty, getProperty, keySet, setPersistentProperty, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.globus.ogsa.ServiceProperties
flush, getPersistentProperty, getProperty, setPersistentProperty, setProperty
 

Field Detail

home

protected javax.ejb.EJBHome home

factoryNode

protected ServiceNode factoryNode
Constructor Detail

EJBHomeFactoryProvider

public EJBHomeFactoryProvider(java.lang.String name,
                              javax.ejb.EJBHome _home,
                              javax.ejb.EJBObject ignoredParam)
Method Detail

preCreate

public void preCreate(GridServiceBase base)
               throws GridServiceException
Description copied from interface: GridServiceCallback
Called when a service object is created.

Specified by:
preCreate in interface GridServiceCallback
Overrides:
preCreate in class GridServiceImpl
Throws:
GridServiceException

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

createRemoteService

public java.lang.String createRemoteService(EJBServiceImpl skel,
                                            java.lang.String nameClue)
                                     throws java.rmi.RemoteException
This method sets the skeleton that will be returned by createServiceObject(). Since it is a regular instance variable this method must be synchronized.

Throws:
java.rmi.RemoteException

createServiceObject

public GridServiceBase createServiceObject(ExtensibilityType creation,
                                           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:
creation - parameters the client may pass to the factory at creation time
Throws:
GridServiceException - if the service instance could not be created

getCreationType

protected ExtensibilityType getCreationType(javax.ejb.EJBObject remote,
                                            java.lang.String nameClue)
This attempts to guess a good name for the "path" portion of the service's url


cleanString

public static java.lang.String cleanString(java.lang.String s,
                                           int maxLen)
Removes everything but letters and numbers from a string. Can also shorten it to maxLen



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