Creating a mediation handler
Use this task to create a mediation handler using the Application Server Toolkit.
This task assumes that you have an EJB module containing the mediation handler class for your mediation. For more information see Creating EJB modules. For more information about writing a mediation handler class, refer to the Service Integration information.
In this task, you 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.
Use the Application Server Toolkit to complete the following steps:
- Display your EJB module:
The EJB project is displayed in the EJB Deployment Descriptor editor.
- Switch to the J2EE perspective to work with J2EE projects. Click Window > Open Perspective > Other >J2EE.
- In the Project Explorer view, expand EJB Modules to display the folder containing your EJB project.
- Expand the folder, and double-click on your project.
- Select the Mediation Handler tab at the bottom of the editor area to open the Mediation Handler pane.
- Click Add to open the Define Mediation Handler pane.
- Specify the following properties for the mediation handler:
The parameter list is completed automatically with parameter names, where appropriate.
- 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.
- Optional: Select the parameters that you want to use to control the behavior of the mediation at runtime. By default, all the parameters are selected.
- 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.
- Optional: If you want to specify advanced options for the handler list, click ShowAdvanced, then select the Define Handler List Containment check box. This displays the Handler Lists Containment pane. 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 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.
- The mediation handler is displayed in the Mediation handler 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.
- 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.
Parent topic
Deploying a mediation handler
Related concepts
Mediation handlers