Home >Documents >Adapter Tutorial · PDF file (1) a MQSeries Queue Consumer dequeing the message from a...

Adapter Tutorial · PDF file (1) a MQSeries Queue Consumer dequeing the message from a...

Date post:15-Apr-2020
Category:
View:0 times
Download:0 times
Share this document with a friend
Transcript:
  • Reference: 2005/04/26

    Adapter Tutorial

    Tutorial 9 : MQSeries Queue integration through the Oracle AS Adapter for JMS The Oracle Adapter for JMS provides standards based connectivity to various enterprise messaging software and provides comprehensive support for the JMS specification. This example showcases MQSeries Queue to Queue integration.

    Tutorial 9 : MQSeries Queue integration through the Oracle AS Adapter for JMS ......................................................................................................................................1

    Overview .............................................................................................................................................................1 Configuring the MQSeries Consumer Service – PartnerLink.............................................................................1 Configuring the MQSeries Producer Service......................................................................................................5 Configuring an end to end BPEL process ...........................................................................................................7 Deployment and testing of the BPEL process...................................................................................................10 Configuring using Native Format Builder.........................................................................................................11 Testing using MQSeries Queue Explorer..........................................................................................................14

    Overview The Oracle AS Adapter for JMS is part of the Oracle BPEL Process Manager install and is a JCA 1.5 Resource Adapter. The Adapter Framework (AF) is used for the bidirectional integration of the JCA 1.5 resource adapters with BPEL Process Manager. Adapter FW is based on open standards and employs the Web Service Invocation Framework (WSIF) technology for exposing the underlying JCA Interactions as Web Services. This example showcases the following:

    (1) a MQSeries Queue Consumer dequeing the message from a MQSeries queue and triggering the BPEL process. The message payload is of type “Text” and is defined by a delimited schema using the Native Format Builder.

    (2) A MQSeries Queue Producer enqueuing the message to a MQSeries Queue based on the invoke BPEL message.

    Configuring the MQSeries Consumer Service – PartnerLink The Oracle Adapters have an easy-to-use Adapter Wizard that is supported on both JDeveloper and Eclipse platforms. This example showcases the steps for the JDeveloper IDE and is pretty much the same for the Eclipse IDE as well.

  • 1. Launch JDeveloper. This is bundled with the BPEL Process Manager product. 2. Drag & drop an empty BPEL project 3. Drag & drop a Partner Link activity. 4. Select the Adapter Wizard (no 3) option. 5. Select the JMS Adapter option 6. Follow the Adapter wizard screens as shown in the below figures: 7. Name the Adapter Service

    8. Specify the JNDI name for the run-time connection.

    9. Select the “ConsumeMessage” option in the next screen

  • 10. Enter the MQSeries parameters as shown below. The Destination Name refers to the MQSeries Queue Name. The targetClient=0 is used indicates that the JMS Header will be part of the message. You have to specify the targetClient value of “1” if you want the JMS Headers to be truncated from the message. The JMS Adapter supports Text and Byte messages. This example uses the Text Message format.

    11. One of the key features of the JMS Adapter is the support for native format translation into XML and vice-versa. The Adapter payload (Text or Byte) can be pointed to a delimited, fixed-positional, Cobol copy book data and is converted to XML and back by the Native Format Translator. This example points to a delimited schema for the incoming Text Message.

  • 12. This completes the configuration of the MQSeries Consumer Service

    13. Complete the Partner Link as shown below:

  • Configuring the MQSeries Producer Service

    14. Drag & drop a Partner Link activity & name the Adapter Service.

    15. Specify the JNDI name of the run-time connection

    16. Select the “Produce_Message” option.

    17. Enter the parameters for the MQSeries Producer. The Destination Name refers to the queue for enqueuing the messages. The Message Type is “Text”. The Delivery Mode, Priority and TimeToLive are set to defaults. Please refer to the JMS Adapter User Guide for further information on these parameters.

  • 18. Specify the schema for the incoming Text Message.

    19. This completes the creation of the MQSeries producer service

    20. Complete the configuration of MQSeries Producer Service as shown in the below figure.

  • Configuring an end to end BPEL process

    21. Configure a receive activity to point to the MQSeries Consumer Service

    22. Select “create Instance” option and create a global variable (“InputVariable” in this example) to receive the incoming message from the MQSeries Consumer.

  • Drag & drop an invoke activity and point to the MQSeries Producer Partner Link

    23. Drag & drop an assign activity to set the MQSeries Header and Payload message for the MQSeries Producer.

  • 24. The end to end BPEL process looks like the following:

  • Deployment and testing of the BPEL process

    25. Set the OC4J-ra.xml of the Oracle AS Adapter for JMS to point to the MQSeries run-time connection parameters as shown in the following figure.

    26. Deploy the BPEL process and Restart the BPEL server. 27. Test the BPEL process by doing a put operation in the MQSeries Queue 28. The successful flow is shown in the below figure.

  • Configuring using Native Format Builder

  • 1. Select the Define Schema for Native Format option

    2. Select the Delimited option as shown in the figure below

    3. Select the file to sample 4.

    5. Specify a dummy element for representing each record.

  • 6. Select “,” as the field delimiter and end of line (eol) as the record delimiter.

  • 7. The XSD for the native delimited data is automatically generated by the Native Format Builder wizard as shown in the figure.

    Testing using MQSeries Queue Explorer

    8. Use the Websphere MQ Explorer (MQSeries management & monitoring tool) to put messages into the Source_Queue and to check messages created in the Destination_queue.

Click here to load reader

Reader Image
Embed Size (px)
Recommended