+ All Categories
Home > Documents > Adapter Tutorial€¦ · (1) a MQSeries Queue Consumer dequeing the message from a MQSeries queue...

Adapter Tutorial€¦ · (1) a MQSeries Queue Consumer dequeing the message from a MQSeries queue...

Date post: 15-Apr-2020
Category:
Upload: others
View: 7 times
Download: 0 times
Share this document with a friend
15
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.
Transcript
Page 1: Adapter Tutorial€¦ · (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

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.

Page 2: Adapter Tutorial€¦ · (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

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

Page 3: Adapter Tutorial€¦ · (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

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.

Page 4: Adapter Tutorial€¦ · (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

12. This completes the configuration of the MQSeries Consumer Service

13. Complete the Partner Link as shown below:

Page 5: Adapter Tutorial€¦ · (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

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.

Page 6: Adapter Tutorial€¦ · (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

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.

Page 7: Adapter Tutorial€¦ · (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

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.

Page 8: Adapter Tutorial€¦ · (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

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.

Page 9: Adapter Tutorial€¦ · (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

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

Page 10: Adapter Tutorial€¦ · (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

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.

<connector-factory location="eis/mqseries/Queue" connector-name="Jms Adapter">

<config-property name="connectionFactoryLocation" value="com.ibm.mq.jms.MQQueueConnectionFactory"/> <config-property name="factoryProperties" value="QueueManager=MS_BPEL_Queue_Mgr;

TransportType=1;HostName=127.0.0.1;Port=1414; Channel=MS_BPEL_Channel"/>

<config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/> <config-property name="isTopic" value="false"/> <config-property name="isTransacted" value="true"/> <config-property name="username" value="MUSR_MQADMIN"/> <config-property name="password" value="welcome"/> </connector-factory>

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.

Page 11: Adapter Tutorial€¦ · (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

Configuring using Native Format Builder

Page 12: Adapter Tutorial€¦ · (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

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.

Page 13: Adapter Tutorial€¦ · (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

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

Page 14: Adapter Tutorial€¦ · (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

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.

Page 15: Adapter Tutorial€¦ · (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

Recommended