4 Replies Latest reply: Aug 10, 2014 1:13 PM by 1062147 RSS

    How to Correlate request and reply when using JMS queues in SOA Suite

    1062147

      Hi,

       

      I already searched a lot on the internet to find simple descriptive way to implement Correlation between request and reply when using JMS in SOA Suite but I didn’t get straight forward any example which is easy to understand.

       

      I tried to create correlation set in Producer JMS BPEL and correlate them in invoke activity at correlation tab but it didn’t worked

      When I simply set ‘jca.jms.JMSCorrelationID’ Property with input variable form invoke activity then it was showing that value at weblogic in front of Correlation ID field.

       

      When I set ‘jca.jms.JMSMessageID’ Property with input variable form invoke activity then it didn’t reflected on weblogic inside queue messages (in front of Message ID field – not reflected)

       

      I am completely confused there are lot of options which are related with Correlation message as follow :

       

      From Structure Window in JDeveloper

      Create Correlation Set Option and then use in Invoke/Receive/OnMessage from Correlation Tab

       

      From Invoke Activity Properties Tab i can see :

            jca.jms.JMSCorrelationID

            jca.jms.JMSMessageID

            jca.jms.JMSReplyTo

            jca.jms.JMSDestinationName

            jca.jms.JMSDestinationProperties

       

      From EM Right Click on Composite -->Service/Reference Properties--><ProduceJMSRef>

       

      ReplyDestinationName

      AllowTemporaryReplyDestination

                  requestReply.useCorrelation

       

       

      can any body please provide me example to implement correlation when using JMS Queue (when using both Message ID and Correlation ID) (only using Correlation ID)

      and where above properties are used, are all same or there is a difference among them.

       

       

      Thanks

        • 1. Re: How to Correlate request and reply when using JMS queues
          991448

          If you are using Oracle Service Bus I have implemented this patters using the below links :-

           

          http://docs.oracle.com/cd/E21764_01/doc.1111/e15866/jms.htm#i1053749

           

          31.9.3 JMS Correlation ID Pattern

          When you design a business service in Java, make sure that you set the value of JMS Correlation ID on the response to the value of JMS Correlation ID on the request before sending the JMS response to a queue.

          You can obtain the JMS Correlation ID when you receive a message using:

          String getJMSCorrelationID() 

          The above method returns correlation ID values as Strings that provide specific message IDs or application-specific values.

          To set the JMS Correlation ID when you send a message:

          void setJMSCorrelationID(String correlationID)

           

          31.9.4 Comparison of Message ID and Correlation ID Patterns

          The JMS request-response patterns differ in the following ways:

          • The method by which the response is correlated with the request
          • The choice of the response queue

          The differences between these two patterns are summarized in Table 31-1.

          Table 31-1 Differences Between Message ID and Correlation ID Patterns

          JMS Pattern NameResponse QueueCorrelationID

          Correlation ID Pattern

          All responses go to the same fixed queue(s).

          The server copies the request Correlation ID to the response Correlation ID.

          Message ID Pattern

          The responses dynamically go to the queue indicated by theJMSReplyTo property.

          The server copies the request Message ID to the response Correlation ID.

          • 2. Re: How to Correlate request and reply when using JMS queues in SOA Suite
            1062147

            No I am looking SOA Suite implementation not OSB, I have already seen this before but it's for OSB and i saw many more post and blog for OSB related for Correlation but not getting for SOA Suite using above Properties.

            • 3. Re: How to Correlate request and reply when using JMS queues in SOA Suite
              991448

              Did you try this blog from Biemond ? He has explained very clearly with screen shots.

              Java / Oracle SOA blog: JMS Request Reply Interaction Pattern in Soa Suite 11g

              • 4. Re: How to Correlate request and reply when using JMS queues in SOA Suite
                1062147

                In Biemond blog, he is mapping MessageID to CorrelationID from Assign inside Mediator but here Correlation Set and alias are not created and form Correlation Tab inside Invoke/receve is not used.

                 

                i think correlation is not done at BPEL Level, i am looking implementation using Correlation Sets (used in invoke activity at correlation tab and same with receive activity).

                 

                please can anybody just provide me steps in few lines because i search a lot on internet but i am not getting any example using correlation set for JMS.

                 

                one more doubt biemond, in his blog, he has used correlation with Synchronous request and reply operation also, but i have heard that in synchronous calls correlation is not required (because there is no delay in reply and so same thread is used to perform Sync transaction) then why correction option is available on Synchronous calls also.

                 

                Thanks.