com.ibm.commerce.component

Class AbstractManagedComponentImpl

  • java.lang.Object
    • com.ibm.commerce.component.BaseComponentImpl
      • com.ibm.commerce.component.AbstractManagedComponentImpl
  • All Implemented Interfaces:
    BaseComponent
    Direct Known Subclasses:
    OpenWebServiceComponentImpl


    public abstract class AbstractManagedComponentImpl
    extends com.ibm.commerce.component.BaseComponentImpl
    This class provides the abstract implementation of a component to handle the execution of a service command. This implementation handles the transaction and business context service logic. This limits component implementations to converting service objects into the required parameters to execute a service command and to prepare the response or error response.
    • Field Summary

      • Fields inherited from class com.ibm.commerce.component.BaseComponentImpl

        KEY_CMD_STOREID
    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractManagedComponentImpl()
      Create an instance of the abstract component implementation, it calls its parents constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void executeServiceCommand(ActivityToken activityToken, java.util.Map requestParameters, java.lang.String interfaceName)
      This method initializes the execution of the service command by specifying the identity of the thread to associate with the WCSecurityRole.
      • Methods inherited from class com.ibm.commerce.component.BaseComponentImpl

        getContextService
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractManagedComponentImpl

        public AbstractManagedComponentImpl()
        Create an instance of the abstract component implementation, it calls its parents constructor.
    • Method Detail

      • executeServiceCommand

        public void executeServiceCommand(ActivityToken activityToken,
                                          java.util.Map requestParameters,
                                          java.lang.String interfaceName)
                                   throws ServiceException
        This method initializes the execution of the service command by specifying the identity of the thread to associate with the WCSecurityRole. After initialization, it executes the service command with transaction management and retriable logic. This method will start the transaction and business context service request. The command first determines if it needs to run. Next, it performs the callout to the process response to generate the response, end the activity service, and commit the transaction. If the command fails then the process error response callout is invoked to generate the error response to return. In the case of failure, the transaction is rolled back. After a failure, the service command will retry execution of itself if possible due to optimistic locking or other unexpected system errors.
        Parameters:
        activityToken - The activity token.
        requestParameters - The request parameters of the service request.
        interfaceName - The interface of the service command to invoke.
        Throws:
        ServiceException - A system error occured where the problem is not related to the input of the request but rather the internal state of the component. These errors require manual intervention for correction.