To invoke the compose() method of the outbound messaging system interface, specify the following parameters:
- viewname
- The name of the composition view to be used, as specified in the VIEWNAME column of an existing record in the VIEWREG table. Important: In the record referred to in the VIEWREG table, the values of the INTERFACENAME and CLASSNAME columns must contain the name of the interface and class associated with all WebSphere Commerce messaging system view commands. The name of the interface must be com.ibm.commerce.messaging.viewcommands.MessagingViewCommand. The name of the class must be com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl.
- CommandContext
- For information on the CommandContext interface or the CommandContextImpl refer to the class that implements the interface.
- TypedProperty
- The values in the typed property must be strings, or objects that implement the toString() method.
The compose() method runs a view command for each of the transports enabled and assigned to the current message type in the Administration Console. The method performs the following processes:
- It uses the viewname parameter as well as the storeId and device format from each transport, as defined in the Administration Console. These values are used to look up the view command in the VIEWREG table.
- It runs the view command, passing it the values specified in the TypedProperty parameter. When the command is run, the system uses the viewname, storeId, and device format id to look up the JSP page in the PROPERTIES column of the VIEWREG table. The JSP page is run and passed the values in the TypedProperty parameter.
- The JSP composes the message, and it is sent through the appropriate transport when a send method is invoked in the object. Sending may be done using transacted, immediate, or request-reply on the messaging object on which composition was run.