Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this document? Why not share!

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
795
On Slideshare
795
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
15
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Reference: 2005/04/26 Adapter TutorialTutorial 10 : MQSeries Queue to Topic integration using OracleBPEL PM and Oracle AS Adapter for JMSThe Oracle Adapter for JMS provides standards based connectivity to various enterprise messaging softwareand provides comprehensive support for the JMS specification. This example showcases MQSeries Queue toTopic integration.Tutorial 10 : MQSeries Queue to Topic integration using OracleBPEL PM and Oracle AS Adapter for JMS .......................................................................1 Overview .............................................................................................................................................................1 Configuring the MQSeries Queue Consumer Service – PartnerLink .................................................................1 Configuring the MQSeries Topic Producer Service............................................................................................5 Configuring an end to end BPEL process ...........................................................................................................7 Deployment and testing of the BPEL process...................................................................................................10 Appendix ...........................................................................................................................................................12 MQSeries Topic Setup ......................................................................................................................................12OverviewThe Oracle AS Adapter for JMS is part of the Oracle BPEL Process Manager install and is a JCA 1.5 ResourceAdapter. The Adapter Framework (AF) is used for the bidirectional integration of the JCA 1.5 resourceadapters with BPEL Process Manager. Adapter FW is based on open standards and employs the Web ServiceInvocation Framework (WSIF) technology for exposing the underlying JCA Interactions as Web Services. Thisexample 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 XSD (2) A MQSeries Topic Producer enqueuing the message to a MQSeries Topic based on the invoke BPEL message.Configuring the MQSeries Queue Consumer Service – PartnerLinkThe Oracle Adapters have an easy-to-use Adapter Wizard that is supported on both JDeveloper and Eclipseplatforms. This example showcases the steps for the JDeveloper IDE and is pretty much the same for theEclipse IDE as well. 1. Launch JDeveloper. This is bundled with the BPEL Process Manager product.
  • 2. 2. Drag & drop an empty BPEL project3. Drag & drop a Partner Link activity.4. Select the Adapter Wizard (no 3) option.5. Select the JMS Adapter option6. Follow the Adapter wizard screens as shown in the below figures:7. Name the Adapter Service8. Specify the JNDI name for the run-time connection.9. Select the “ConsumeMessage” option in the next screen
  • 3. 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. The Adapter payload (Text or Byte) can be pointed to a delimited, fixed-positional, Cobol copy book data or an XSD schema. This example uses an XSD schema.
  • 4. 12. This completes the configuration of the MQSeries Consumer Service13. Complete the Partner Link as shown below:
  • 5. Configuring the MQSeries Topic 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.
  • 6. 17. Enter the parameters for the MQSeries Topic Producer. The Destination Name refers to the Topic 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.
  • 7. 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
  • 8. 22. Select “create Instance” option and create a global variable (“InputVariable” in this example) to receive the incoming message from the MQSeries Consumer.23. Drag & drop an invoke activity and point to the MQSeries Topic Producer Partner Link24. Drag & drop an assign activity to set the MQSeries Header and Payload message for the MQSeries Producer.
  • 9. 25. The end to end BPEL process looks like the following:
  • 10. Deployment and testing of the BPEL process 26. Set the OC4J-ra.xml of the Oracle AS Adapter for JMS to point to the MQSeries Queue 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> 27. Set the OC4J-ra.xml of the Oracle AS Adapter for JMS to point to the MQSeries Topic run-time connection parameters as shown in the following figure.<connector-factory location="eis/mqseries/Topic" connector-name="Jms Adapter"> <config-property name="connectionFactoryLocation"value="com.ibm.mq.jms.MQTopicConnectionFactory"/> <config-property name="factoryProperties" value="QueueManager=MS_BPEL_Queue_Mgr; BrokerQueueManager=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="true"/> <config-property name="isTransacted" value="true"/> <config-property name="username" value="MUSR_MQADMIN"/> <config-property name="password" value="welcome"/> </connector-factory> 28. Deploy the BPEL process and Restart the BPEL server. 29. Test the BPEL process by doing a put operation in the MQSeries Queue 30. 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.
  • 11. 31. The successful flow is shown in the below figure.
  • 12. AppendixMQSeries Topic Setup1. Download and install MQSeries.The evaluation installable can be found athttp://www14.software.ibm.com/webapp/download/product.jsp?s=p&id=TDUN-49EVER&dt=TRIAL&v=5.3Please use the default directory for installation of the product.2. Configure the JMSAdmin.config file .This file can be found at the following location.
  • 13. "<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphereMQJavabin"Edit the following entries :INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactoryPROVIDER_URL=file://localhost/D:/JNDIBindingsThe provider URL is the place where the JNDI context is created for MQSeries Topics.You have to explicitlycreate the directory D:/JNDIBindings. The drive can be any drive (A-Z). The directory name can be anything.SECURITY_AUTHENTICATION=none3. You need to apply the latest fix packs for WebSphere MQ V5.3 (such as Fix Pack 8, CSD08) include MA0Cto use the Publish/Subscribe functionality of MQSeries. This patch can be downloaded at the following locationand gets installed under Program Files/IBM directory. http://www-1.ibm.com/support/docview.wss?rs=203&uid=swg24000643&loc=en_US&cs=utf-8&lang=en1. Please make sure that the jar files under the following directory are included in the CLASSPATH<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphere MQJavalib5. You need to run the following script to create the queues required for MQSeries Topic setup.<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphere MQJavabin>runmqsc QMGR < MQJMS_PSQ.mqsc1. Run JMSAdmin and the following set of commands to create a TopicConnectionFactory (SampleTCF) and Topic (testTopic). The JNDI name for the testTopic is /test/demo/testTopic.<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphereMQJavabin>JMSAdminInitCtx>def tcf(SampleTCF) qmgr(QMGR)InitCtx> def ctx(test)InitCtx> chg ctx(test)InitCtx/test> def ctx(demo)InitCtx/test> chg ctx(demo)InitCtx/test/demo> def t(DemoTopic) topic(testTopic)InitCtx/test/demo> display ctx Contents of InitCtx/test/demo .bindings java.io.File a DemoTopic com.ibm.mq.jms.MQTopic 2 Object(s) 0 Context(s). Make sure the queue managers publish/subscribe broker is running. To check, run the dspmqbrk command.<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphere MQJavabin>dspmqbrk -m <QMGR>
  • 14. The following exception is obtained if the publish/subscribe broker queue manager is not running:MQSeries Publish/Subscribe broker for queue manager <QMGR> not active8. To start it, run the command strmqbrk as shown below:<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphere MQJavabin>strmqbrk -m <QMGR>The following output is obtained after successful start of the broker queue manager:MQSeries Publish/Subscribe broker started for queue manager <QMGR>.You need to run the following command for stopping the broker queue manager.<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphere MQJavabin>endmqbrk -m <QMGR>The following output is obtained after successful start of the broker queue manager:MQSeries Publish/Subscribe broker started for queue manager <QMGR>.You need to run the following command for stopping the broker queue manager.<Drive>:Program FilesIBMSourceWebSphere MQ t_en_usMSIProgram FilesIBMWebSphere MQJavabin>endmqbrk -m <QMGR>9. Create a channel using the MQSeries Explorer of type "Server Connection".