com.ibm.websphere.ilm.bpel
Interface InstanceLocator


public interface InstanceLocator

An Interface for an InstanceLocator

Since:
1.0
Version:
1.0

Method Summary
 CorrelationProperties extractCorrelationProperties(java.lang.String correlationSetKey, org.apache.wsif.WSIFMessage message)
          This method will locate and return all property values inside those correlation sets based on the operation name.
 javax.ejb.EJBLocalObject findInstance(CorrelationProperties correlationProperties)
          Method findInstance.
 javax.ejb.EJBLocalObject findInstance(java.lang.String correlationSetKey, org.apache.wsif.WSIFMessage message)
          This method will locate and return a stateful service instance in order that a business method can be invoked upon it.
 javax.ejb.EJBLocalObject locateInstance(java.lang.String correlationSetKey, org.apache.wsif.WSIFMessage message)
          This method will locate and return a stateful service instance in order that a business method can be invoked upon it.
 

Method Detail

findInstance

public javax.ejb.EJBLocalObject findInstance(java.lang.String correlationSetKey,
                                             org.apache.wsif.WSIFMessage message)
                                      throws InstanceLocationException,
                                             CreateFailedException,
                                             ServiceDefinitionException,
                                             InvalidMessageException,
                                             MultipleInstanceException
This method will locate and return a stateful service instance in order that a business method can be invoked upon it. This method is intended to be called by a BPEL+ stateless session bean process facade.

More information is available in the Overview for the com.ibm.websphere.ilm.bpel package.

Parameters:
correlationSetKey - this is the string containing the operation name (business method invoked on stateless session facade)
message - A org.apache.wsif.WSIFMessage (such as org.apache.wsif.base.WSIFDefaultMessage) All message parts should be added as "Object" => msg.addObject(String key, Object value);

Where key = Part Name
and value = Part Value

Returns:
EJBLocalObject An Object implementing the Local interface of the instance of the Service
Throws:
InstanceLocationException - - a general exception type thrown if a problem occurs locating the stateful instance - this will be replaced by a more specialized set of exceptions in the future.
CreateFailedException - - an exception thrown when there was a problem creating a process instance
ServiceDefinitionException - - an exception thrown when there is a problem with the service definition
InvalidMessageException - - an exception thrown when the message does not contain all the parts expected by the correlation set. For example, an operation for which no CorrelationSets have been defined but no implicit create.
MultipleInstanceException

findInstance

public javax.ejb.EJBLocalObject findInstance(CorrelationProperties correlationProperties)
                                      throws InstanceLocationException,
                                             ServiceDefinitionException,
                                             CreateFailedException,
                                             MultipleInstanceException
Method findInstance. This method will locate and return a stateful service instance in order that a business method can be invoked upon it. This method is intended to be called by a BPEL+ stateless session bean process facade when the correlation properties have already been extracted from the method by the InstanceLocator.extractCorrelationProperties. (It is a performance enhancement to the alternative finInstance method which takes the message and correlationSetKey).

Parameters:
correlationProperties -
Returns:
EJBLocalObject
Throws:
InstanceLocationException
CreateFailedException
MultipleInstanceException
ServiceDefinitionException

extractCorrelationProperties

public CorrelationProperties extractCorrelationProperties(java.lang.String correlationSetKey,
                                                          org.apache.wsif.WSIFMessage message)
                                                   throws InvalidMessageException
This method will locate and return all property values inside those correlation sets based on the operation name. This method is intended to be called by a BPEL+ stateless session bean process facade. More information is available in the Overview for the com.ibm.websphere.ilm.bpel package.

Parameters:
correlationSetKey - this is the string containing the correlation set key (typically, business method invoked on stateless session facade)
message - A org.apache.wsif.WSIFMessage (such as org.apache.wsif.base.WSIFDefaultMessage) All message parts should be added as "Object" => msg.addObject(String key, Object value);

Where key = Part Name
and value = Part Value

Returns:
The CorrelationProperties extracted from the message, based on the correlation meta data associated with the correlation set key
Throws:
InvalidMessageException - - an exception thrown when the message does not contain all the parts expected by the correlation set. For example, an operation for which no CorrelationSets have been defined

locateInstance

public javax.ejb.EJBLocalObject locateInstance(java.lang.String correlationSetKey,
                                               org.apache.wsif.WSIFMessage message)
                                        throws InstanceLocationException,
                                               ServiceDefinitionException,
                                               MultipleInstanceException,
                                               InvalidMessageException
This method will locate and return a stateful service instance in order that a business method can be invoked upon it. This method is intended to be called by a BPEL+ stateless session bean process facade.

More information is available in the Overview for the com.ibm.websphere.ilm.bpel package.

Parameters:
correlationSetKey - this is the string containing the operation name (business method invoked on stateless session facade)
message - A org.apache.wsif.WSIFMessage (such as org.apache.wsif.base.WSIFDefaultMessage) All message parts should be added as "Object" => msg.addObject(String key, Object value);

Where key = Part Name
and value = Part Value

Returns:
EJBLocalObject An Object implementing the Local interface of the instance of the Service
Throws:
InstanceLocationException - - a general exception type thrown if a problem occurs locating the stateful instance - this will be replaced by a more specialized set of exceptions in the future.
ServiceDefinitionException - - an exception thrown when there is a problem with the service definition For example, an operation for which no CorrelationSets have been defined but no implicit create.
InvalidMessageException - - an exception thrown when the message does not contain all the parts expected by the correlation set.
MultipleInstanceException - - an exception thrown when multiple instances are found for the correlation data contained in the message.