Creating a mediation handler

Use this task to create a mediation handler.

Before you start, you need a mediation handler class containing your mediation. For more information, see the topic "Writing a mediation handler" in the Service Integration information.
In this task, you use the Deployment Descriptor editor to edit the deployment descriptor file for your mediation handler enterprise bean, and save it as an EAR file ready to export to WebSphere Application Server.

Complete the following steps:

  1. Display your EJB module:
    1. Switch to the J2EE perspective to work with J2EE projects. Click Window > Open Perspective > Other >J2EE.
    2. In the Project Explorer view, expand EJB Modules to display the folder containing your EJB project.
    3. Expand the folder, select your EJB project and double-click on the Deployment Descriptor.
    The EJB project is displayed in the EJB Deployment Descriptor editor.
  2. Select the Mediation Handlers tab at the bottom of the editor area to open the Mediation Handlers pane.
  3. Click Add to open the Define Mediation Handler pane.
  4. Specify the following properties for the mediation handler:
    Name
    Enter a name for the mediation handler. The name must be unique within the WebSphere Applications Server administrative cell.
    Description
    Optional: Enter a description of the mediation, taking into account any properties specified for the mediation.
    Handler class
    Click Browse, next to the Handler Class field, to display a list of mediation handler classes. Select the mediation handler class for the mediation.
    The parameter list is completed automatically with parameter names, where appropriate.
  5. Optional: You can set the mediation parameters to control the behaviour of the mediation handler at runtime. By default, all the parameters are selected.
  6. Optional: If you want to create the mediation handler in its own handler list, click Finish. By default, the handler list is created with the same name as the mediation handler.
  7. Optional: If you want to add your handler to multiple handler lists, click ShowAdvanced, then select the Define Handler List Containment check box. This displays the Handler Lists Containment pane showing which handler lists contain this handler. Specify the following properties, click Add, and then Finish to add the mediation handler to the handler list:
    Handler List Name
    Either select the name of an existing handler list in the list box, or enter a new name.
    Handler List Description
    Optional: Enter a description of the handler list, for information only.
    Sequence Number
    Specify the position of the mediation handler in the handler list. By default, a mediation handler is added at the first position, sequence number 0, in the handler list. At runtime, mediation handlers are applied to messages in order of their sequence numbers. The mediation handler at the lowest sequence number is applied first. If two handlers have the same sequence numbers, both will run, but the order will be undetermined.
  8. If the mediation handler has properties that are non-primitive types, they are displayed in the Non-primitive properties page. For each property displayed, select the type of reference entry to create in the Deployment Entry Type list box, then click Finish.
  9. The mediation handler is displayed in the Mediation handlers pane. You can view or change the properties and parameters you have defined. For more information about changing handler lists, mediation parameters, or reference parameters, see Changing deployment information.
  10. Select File > Save to save the mediation handler as an EAR file.
Next, you are ready to export the EAR file to WebSphere Application Server.
Related concepts
Mediation handlers
Mediation handler lists