JMSCorrelationID and JMSMessageID

          I'm trying to create a producer that sends multiple PTP messages and receives multiple
          replies. It will need to correlate the requests with the replies. I'm finding
          that Weblogic JMS is not setting the JMSMessageID, which is what I'm trying to
          use for the JMSCorrelationID.
          Is there something I have to configure, or do programmitically, to have Weblogic
          JMS automatically create a unique MessageID?
          Thanks in advance.
          Producer code is like the following:
          TextMessage textmsg = session.createTextMessage();
          //printing the JMSMessageID prints NULL
          System.out.println("MESSAGE ID: " + textmsg.getJMSMessageID());
          textmsg.setJMSCorrelationID(textmsg.getJMSMessageID());
          msgProducer.send(textmsg);
          Cosumer(receives the message above) code is like the following:
          requestMsg = queueReceiver.receive();
          Queue replyQ = (Queue)requestMsg.getJMSReplyTo();
          queueSender = queueSession.createSender(replyQ);
          TextMessage replyMsg = queueSession.createTextMessage("reply");
          //printing JMSCorrelationID prints NULL
          System.out.println("JMS CORRELATION ID: " + requestMsg.getJMSCorrelationID());
          replyMsg.setJMSCorrelationID(requestMsg.getJMSCorrelationID());
          queueSender.send(replyMsg);
          

          "James Goodwin" <[email protected]> wrote:
          >
          >I'm trying to create a producer that sends multiple PTP messages and
          >receives multiple
          >replies. It will need to correlate the requests with the replies. I'm
          >finding
          >that Weblogic JMS is not setting the JMSMessageID, which is what I'm
          >trying to
          >use for the JMSCorrelationID.
          >
          >Is there something I have to configure, or do programmitically, to have
          >Weblogic
          >JMS automatically create a unique MessageID?
          >
          >Thanks in advance.
          >
          >Producer code is like the following:
          >
          >TextMessage textmsg = session.createTextMessage();
          >//printing the JMSMessageID prints NULL
          >System.out.println("MESSAGE ID: " + textmsg.getJMSMessageID());
          >textmsg.setJMSCorrelationID(textmsg.getJMSMessageID());
          >msgProducer.send(textmsg);
          >
          >Cosumer(receives the message above) code is like the following:
          >
          >requestMsg = queueReceiver.receive();
          >Queue replyQ = (Queue)requestMsg.getJMSReplyTo();
          >queueSender = queueSession.createSender(replyQ);
          >TextMessage replyMsg = queueSession.createTextMessage("reply");
          >//printing JMSCorrelationID prints NULL
          >System.out.println("JMS CORRELATION ID: " + requestMsg.getJMSCorrelationID());
          >replyMsg.setJMSCorrelationID(requestMsg.getJMSCorrelationID());
          >queueSender.send(replyMsg);
          >
          Once again, I've finally found the answer. The javax.jms.Message javadoc states
          that the JMSMessageID is not set until after the send method is called. So the
          producer has to capture the JMSMessageID after the send. The consumer has to use
          JMSMessageID to set the JMSCorrelationID. Then all is right with the world.
          Hope this helps somebody.
          

Similar Messages

  • Is Response Required in Proxy Service and Business Service

    Hi All,
    I have made proxy service that is putting message on the Queue through a Business Service. Now I wanted to know what is the use of "Is Response Required" configuration parameter in Business as well Proxy Service. Also what is the significance of the JMSCorrelationID and JMSMessageID.
    Thanks,
    Anuj

    Hi Anuj,
    You can refer to the documentation for the information on "Is Response Required" in
    Proxy Service @ http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/interopjms/transport.html#wp1096236
    Business Service @ http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/interopjms/transport.html#wp1097863
    And for the significance of JMSCorrelationID and JMSMessageID please refer to link @ http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/interopjms/MsgIDPatternforJMS.html
    Please do reach out to me in case you need specific information.
    Thanks,
    Patrick

  • How do I use a MessageSelector with application-specific properties

    According to a couple of JMS references (Sun, Oreilly) and the oracle documentation (under the heading "Using Oracle Java Messaging Service (JMS) to Access AQ", page 102 of 1082 , Application Developers Guide - Advanced Queuing, Release 2 (8.1.6))
    Standard JMS Features
    "Message selection based on message header fields/properties"
    Is there a special syntax for using application-specific (user defined) JMS message properties as message selectors in Oracle 8.1.7?
    I've tried to create a message selector based on a custom property that I set, i.e. "username != 'William'". (example from O'Reilly JMS book, pg. 44)
    I always get a JMS-159: Invalid selector Selector Parse error unless the property is a JMS-Defined property. i.e., " JMSMessageID = 'ID:9789D65E215B3613E034080020B1456E' " works fine.
    From the docs and the oter examples, I figure application-specific (user-defined) properties are legal.
    Thans for any help in advance.

    Well I found an article in another forum that states in oracle 8i, message selectors are only supported on JMSCorrelationID and JMSMessageID
    (9i will have/has the full JMS spec support for message selectors , or so the response to the message says)
    Thanks anyway
    (Aricle Is In Products > Database > Oracle Advanced Queueing
    Title is JMS AQ: selector in createReceiver does not work)

  • How do I use a JMS MessageSelector with application-specific properties

    According to a couple of JMS references (Sun, Oreilly) and the oracle documentation (under the heading "Using Oracle Java Messaging Service (JMS) to Access AQ", page 102 of 1082 , Application Developers Guide - Advanced Queuing, Release 2 (8.1.6))
    Standard JMS Features
    "Message selection based on message header fields/properties"
    Is there a special syntax for using application-specific (user defined) JMS message properties as message selectors in Oracle 8.1.7?
    I've tried to create a message selector based on a custom property that I set, i.e. "username != 'William'". (example from O'Reilly JMS book, pg. 44)
    I always get a JMS-159: Invalid selector Selector Parse error unless the property is a JMS-Defined property. i.e., " JMSMessageID = 'ID:9789D65E215B3613E034080020B1456E' " works fine.
    From the docs and the oter examples, I figure application-specific (user-defined) properties are legal.
    Thans for any help in advance.

    Well I found an article in another forum that states in oracle 8i, message selectors are only supported on JMSCorrelationID and JMSMessageID
    (9i will have/has the full JMS spec support for message selectors , or so the response to the message says)
    Thanks anyway
    (Aricle Is In Products > Database > Oracle Advanced Queueing
    Title is JMS AQ: selector in createReceiver does not work)

  • Async/Sync Communication using JMS adapter without BPM

    Hello ,
    Pls suggest how Async/Sync Communication using JMS adapter without BPM .
    In my scenario I have JMS Sender and then RFC/JDBC as Sync and then again JMS receiver
    Pls explain  the concept of
    JMSMessageID and JMSCorrelationID  and how to use it by an example.
    Regards

    Hi,
    If you have selected JMSMessageID, JMSCorrelationID, or JMSProperty and entered a JMS message ID in these fields, you should see the Remove 'ID:' Marker from JMSMessageIDindicator. Set the indicator.
    This is necessary because the JMS specification stipulates that each JMS message ID starts with 'ID'. However, this conflicts with ISO-11578.
    - JMSMessageID (Uniqueness Is JMS-Provider-Dependent)
    (String) The unique message ID. Note that this is not a required field and can be null. Since the JMS provider might not use your provided message ID, the Connector sets a special property called $jms.messageid after sending a message. This is to insure that the message ID always is available to the user. To retrieve this value use conn.getProperty("$jms.messageid") in your After Add hook.
    - JMSCorrelationID (Uniqueness Is JMS-Sender-Dependent)
    (String) This header is set by the application for use by other applications.
    Hope this will help you.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • Crazy JMS pattern

    Hi,
    I'm trying to implement this:
    - JMS queue BS, named QUEUE, is request/response, it has a URI endpoint and a response URI endpoint
    I have 3 proxy services working around this JMS queue, but for now I'm only working with two of them:
    - PS 1: receives the http message and writes into the queue with transport outbound JMSMessageID = $body/messageid
    - PS 3: an external entity now wants to communicate the response, and this PS routes into QUEUE response endpoint with transport outbound JMSCorrelationID = previous JMSMessageID
    Is this possible to do?
    I'm having an hard time implementing this, cause PS 1 just freezes and never correlates to the response.
    I'm testing this using soapUI... making sure $body/messageid is common at all times.
    Is there some tool to check messages (and headers) in JMS queues?
    Can someone help me with this plz?

    atheek1 I guess you are right.
    However I still didn't manage to implement the desired correlation pattern.
    I'm surely doing it wrong... but kinda running out of options.
    I made two new JMS BS: requestQueue_BS and responseQueue_BS
    Both are queues and text message type and requestQueue is JMSCorrelationID response pattern with response URI = responseQueue_BS
    PS1 is any XML service that simply routes message to requestQueue using, inside routing, an transport header transformation of JMSCorrelationID to $body/id/text() on outbound request direction.
    PS3 is any XML service that simply routes message to responseQueue using, inside routing, an transport header transformation of JMSCorrelationID to $body/id/text() on outbound request direction.
    message body example is: <id>4324</id>
    This doesn't work... what am I doing wrong?
    PS1 just waits for the response... it doesn't matter how many times I trigger PS3 with the same JMSCorrelationID, PS1 just waits until it times out... :(
    ******* CONFIG FILES ************
    requestQueue
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:env="http://www.bea.com/wli/config/env" xmlns:jms="http://www.bea.com/wli/sb/transports/jms">
    <ser:coreEntry isProxy="false" isEnabled="true">
    <ser:binding type="abstract XML"/>
    <ser:monitoring isEnabled="false">
    <ser:aggregationInterval>10</ser:aggregationInterval>
    </ser:monitoring>
    <ser:sla-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:sla-alerting>
    </ser:coreEntry>
    <ser:endpointConfig>
    <tran:provider-id>jms</tran:provider-id>
    <tran:inbound>false</tran:inbound>
    <tran:URI>
    <env:value>jms://localhost:7001/weblogic.jms.XAConnectionFactory/requestQueueRequest</env:value>
    </tran:URI>
    <tran:outbound-properties>
    <tran:load-balancing-algorithm>round-robin</tran:load-balancing-algorithm>
    <tran:retry-count>0</tran:retry-count>
    <tran:retry-interval>30</tran:retry-interval>
    <tran:retry-application-errors>true</tran:retry-application-errors>
    </tran:outbound-properties>
    <tran:provider-specific>
    <jms:is-queue>true</jms:is-queue>
    <jms:is-secure>false</jms:is-secure>
    <jms:outbound-properties>
    <jms:message-type>Text</jms:message-type>
    <jms:expiration>0</jms:expiration>
    <jms:enable-message-persistence>true</jms:enable-message-persistence>
    <jms:response-required>true</jms:response-required>
    <jms:response-URI>jms://localhost:7001/weblogic.jms.XAConnectionFactory/responseQueueRequest</jms:response-URI>
    <jms:response-timeout>0</jms:response-timeout>
    <jms:response-pattern>JMSCorrelationID</jms:response-pattern>
    <jms:response-target-map>
    <jms:target-pair>
    <jms:target>AdminServer</jms:target>
    <jms:destination/>
    </jms:target-pair>
    </jms:response-target-map>
    <jms:pass-caller-subject>false</jms:pass-caller-subject>
    </jms:outbound-properties>
    <jms:request-encoding>UTF-8</jms:request-encoding>
    </tran:provider-specific>
    </ser:endpointConfig>
    </xml-fragment>
    and responseQueue
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:env="http://www.bea.com/wli/config/env" xmlns:jms="http://www.bea.com/wli/sb/transports/jms">
    <ser:coreEntry isProxy="false" isEnabled="true">
    <ser:binding type="abstract XML"/>
    <ser:monitoring isEnabled="false">
    <ser:aggregationInterval>10</ser:aggregationInterval>
    </ser:monitoring>
    <ser:sla-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:sla-alerting>
    </ser:coreEntry>
    <ser:endpointConfig>
    <tran:provider-id>jms</tran:provider-id>
    <tran:inbound>false</tran:inbound>
    <tran:URI>
    <env:value>jms://localhost:7001/weblogic.jms.XAConnectionFactory/responseQueueRequest</env:value>
    </tran:URI>
    <tran:outbound-properties>
    <tran:load-balancing-algorithm>round-robin</tran:load-balancing-algorithm>
    <tran:retry-count>0</tran:retry-count>
    <tran:retry-interval>30</tran:retry-interval>
    <tran:retry-application-errors>true</tran:retry-application-errors>
    </tran:outbound-properties>
    <tran:provider-specific>
    <jms:is-queue>true</jms:is-queue>
    <jms:is-secure>false</jms:is-secure>
    <jms:outbound-properties>
    <jms:message-type>Text</jms:message-type>
    <jms:expiration>0</jms:expiration>
    <jms:enable-message-persistence>true</jms:enable-message-persistence>
    <jms:response-required>false</jms:response-required>
    <jms:pass-caller-subject>false</jms:pass-caller-subject>
    </jms:outbound-properties>
    <jms:request-encoding>UTF-8</jms:request-encoding>
    </tran:provider-specific>
    </ser:endpointConfig>
    </xml-fragment>
    PS1
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:con="http://www.bea.com/wli/sb/stages/config">
    <ser:coreEntry isProxy="true" isEnabled="true">
    <ser:binding type="abstract XML"/>
    <ser:monitoring isEnabled="false">
    <ser:aggregationInterval>10</ser:aggregationInterval>
    <ser:pipelineMonitoringLevel>Pipeline</ser:pipelineMonitoringLevel>
    </ser:monitoring>
    <ser:reporting>true</ser:reporting>
    <ser:logging isEnabled="true">
    <ser:logLevel>debug</ser:logLevel>
    </ser:logging>
    <ser:sla-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:sla-alerting>
    <ser:pipeline-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:pipeline-alerting>
    </ser:coreEntry>
    <ser:endpointConfig>
    <tran:provider-id>http</tran:provider-id>
    <tran:inbound>true</tran:inbound>
    <tran:URI>
    <env:value>/ItevProj/proxy/test/3/ps1</env:value>
    </tran:URI>
    <tran:inbound-properties/>
    <tran:all-headers>false</tran:all-headers>
    <tran:provider-specific>
    <http:inbound-properties/>
    </tran:provider-specific>
    </ser:endpointConfig>
    <ser:router>
    <con:flow xmlns:con="http://www.bea.com/wli/sb/pipeline/config">
    <con:route-node name="RouteNode1">
    <con:context/>
    <con:actions>
    <con1:route xmlns:con1="http://www.bea.com/wli/sb/stages/routing/config">
    <con2:id xmlns:con2="http://www.bea.com/wli/sb/stages/config">_ActionId-9035043200913057533-78de896f.1287cc7514b.-7faf</con2:id>
    <con1:service ref="ItevProj/business/common/jms/test/3/requestQueue" xsi:type="ref:BusinessServiceRef" xmlns:ref="http://www.bea.com/wli/sb/reference" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
    <con1:outboundTransform>
    <con2:transport-headers xmlns:con2="http://www.bea.com/wli/sb/stages/transform/config">
    <con3:id xmlns:con3="http://www.bea.com/wli/sb/stages/config">_ActionId-9035043200913057533-78de896f.1287cc7514b.-7da1</con3:id>
    <con2:header-set>outbound-request</con2:header-set>
    <con2:header name="JMSCorrelationID" value="expression">
    <con3:xqueryText xmlns:con3="http://www.bea.com/wli/sb/stages/config">$body/id/text()</con3:xqueryText>
    </con2:header>
    </con2:transport-headers>
    </con1:outboundTransform>
    <con1:responseTransform/>
    </con1:route>
    </con:actions>
    </con:route-node>
    </con:flow>
    </ser:router>
    </xml-fragment>
    PS3
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:env="http://www.bea.com/wli/config/env" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:con="http://www.bea.com/wli/sb/pipeline/config" xmlns:con1="http://www.bea.com/wli/sb/stages/routing/config" xmlns:con2="http://www.bea.com/wli/sb/stages/config">
    <ser:coreEntry isProxy="true" isEnabled="true">
    <ser:binding type="abstract XML" xmlns:con3="http://www.bea.com/wli/sb/services/bindings/config"/>
    <ser:monitoring isEnabled="false">
    <ser:aggregationInterval>10</ser:aggregationInterval>
    <ser:pipelineMonitoringLevel>Pipeline</ser:pipelineMonitoringLevel>
    </ser:monitoring>
    <ser:reporting>true</ser:reporting>
    <ser:logging isEnabled="true">
    <ser:logLevel>debug</ser:logLevel>
    </ser:logging>
    <ser:sla-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:sla-alerting>
    <ser:pipeline-alerting isEnabled="true">
    <ser:alertLevel>normal</ser:alertLevel>
    </ser:pipeline-alerting>
    </ser:coreEntry>
    <ser:endpointConfig>
    <tran:provider-id>http</tran:provider-id>
    <tran:inbound>true</tran:inbound>
    <tran:URI>
    <env:value>/ItevProj/proxy/test/3/ps3</env:value>
    </tran:URI>
    <tran:inbound-properties/>
    <tran:all-headers>false</tran:all-headers>
    <tran:provider-specific>
    <http:inbound-properties/>
    </tran:provider-specific>
    </ser:endpointConfig>
    <ser:router>
    <con:flow>
    <con:route-node name="RouteNode1">
    <con:context>
    <con2:varNsDecl namespace="http://webservice.chargingstation.itev.criticalsoftware.com" prefix="web"/>
    </con:context>
    <con:actions>
    <con1:route>
    <con2:id>_ActionId-9035043200913057533-78de896f.1287cc7514b.-7eb7</con2:id>
    <con1:service ref="ItevProj/business/common/jms/test/3/responseQueue" xsi:type="ref:BusinessServiceRef" xmlns:ref="http://www.bea.com/wli/sb/reference"/>
    <con1:outboundTransform>
    <con3:transport-headers xmlns:con3="http://www.bea.com/wli/sb/stages/transform/config">
    <con2:id>_ActionId-9035043200913057533-78de896f.1287cc7514b.-7d69</con2:id>
    <con3:header-set>outbound-request</con3:header-set>
    <con3:header name="JMSCorrelationID" value="expression">
    <con2:xqueryText>$body/id/text()</con2:xqueryText>
    </con3:header>
    </con3:transport-headers>
    </con1:outboundTransform>
    <con1:responseTransform/>
    </con1:route>
    </con:actions>
    </con:route-node>
    </con:flow>
    </ser:router>
    </xml-fragment>

  • JMS/AQ: Setting properties for JMS message using PL/SQL

    I have created a procedure in PL/SQL that uses JMS messages, and now I need to include a property so that the subscriber can use a message selector to filter out unwanted messages. Is this possible using PL/SQL?
    A previous post said: "... But you can have properties in the message payload itself and also define selectors on the message content ...". But I looked at Sun's tutorial and there it said: "A message selector cannot select messages on the basis of the content of the message body."
    I have 300 different screens and messages apply only to one screen at a time. When the user is looking at screen 'A' I want him to only recieve messages that apply to screen 'A'. I thought I would do this with message selector, but is there any other way?
    Here is my code(borrowed from an earlier post)
    PROCEDURE ENQUEUE_JMS_MESSAGE AS
    BEGIN
    DECLARE
    Enqueue_options DBMS_AQ.enqueue_options_t;
    Message_properties DBMS_AQ.message_properties_t;
    Message_handle RAW(16);
    User_prop_array SYS.AQ$_JMS_USERPROPARRAY;
    Agent SYS.AQ$_AGENT;
    Header SYS.AQ$_JMS_HEADER;
    Message SYS.AQ$_JMS_TEXT_MESSAGE;
    Message_text VARCHAR2(100);
    BEGIN
    Agent := SYS.AQ$_AGENT('',NULL,0);
    User_prop_array := SYS.AQ$_JMS_USERPROPARRAY();
    Header := SYS.AQ$_JMS_HEADER( Agent, '', 'aq1', '', '', '', User_prop_array);
    Message_text := 'Message 1 from PL/SQL';
    Message := SYS.AQ$_JMS_TEXT_MESSAGE(Header, LENGTH(Message_text), Message_text, NULL);
    DBMS_AQ.ENQUEUE(queue_name => 'tstopic',
    Enqueue_options => enqueue_options,
    Message_properties => message_properties,
    Payload => message,
    Msgid => message_handle);
    END;
    END;
    -Christer

    Thanks for the answer. I managed to set the Correlation id and retrieve it using getJMSCorrelationID(). But I did not manage to use the MessageSelector on it. I have used the Topicbrowser which is not part of the JMS standard? I tried to enqueue the messages using Java too and tried to use the topicbrowser on both JMSCorrelationID and user defined properties withou success. Is there some special requirements of the TopicBrowser?
    Enumeration messages;
    oracle.jms.TopicBrowser browser =tsess.createBrowser(topic, "TS", "JMSCorrelationID = 'TST'");
    int count = 0;
    messages = browser.getEnumeration();
    if(messages.hasMoreElements())
    System.out.println("message"); //never executed
    dtxtmsg = (TextMessage)(tsub1.receiveNoWait()) ; //returns a message
    String corrID = dtxtmsg.getJMSCorrelationID(); //returns: TST
    Thanks for your help so far...it would really save my day if you have some ideas on this too!
    -Christer

  • Issue in Synchronous OSB using Jms Queues in OSB11g

    Hi,
    I am working on building a synchronous OSB using the following steps.
    1)     Creating the Synchronous OSB Proxy Service which routes the message to the business service which in turn places a message in the Queue(inqueue) by populating the JMSCorrelationId and waits for the response message to consume from another queue.
    2)     A Composite(SOA) will consume the message from this Queue
    3)     It will do necessary transformation and Places it in another Queue (Say Response Queue).
    4)     OSB Business service waiting in Step 1 will receive the response from this response Queue.
    I used a sample Wsdl which has both request and response message types.
    I observed that the correlation ID is maintained properly from inqueue to response queue. But the message is not getting picked up by OSB from the response Queue
    Twist: It is working absolutely fine in OSB 10g but it is not working in OSB 11g.
    I tried using Messaging service as well as using the sample WSDL i.e keepiing the soap message in the queue. Both the cases are working absolutely fine OSB 10g but not in OSB 11g.
    Can anyone faced a similar issue or any pointers will be great help in this regard.
    Regards,
    Ashok

    To debug this further can you check if the response Q has any active consumers. ? When you use response by correlation ID business service, OSB actually creates MDB's with message selectors under the hood.
    This is a sample of the ejb-jar.xml of the MDB created for a business service with response by Correlation ID pattern.
    <?xml version='1.0' encoding='UTF-8'?>
    <jav:ejb-jar xmlns:jav="http://java.sun.com/xml/ns/javaee">
    <jav:display-name>BEA ALSB JMS Outbound Sync-Async Endpoint</jav:display-name>
    <jav:enterprise-beans>
    <jav:message-driven>
    <jav:ejb-name>ResponseEJB-6577847719916437493-3893eeb7.1287d30ba4f.-7fe1</jav:ejb-name>
    <jav:ejb-class>com.bea.wli.sb.transports.jms.JmsAsyncResponseMDB</jav:ejb-class>
    <jav:transaction-type>Container</jav:transaction-type>
    <jav:message-destination-type>javax.jms.Queue</jav:message-destination-type>
    <jav:activation-config>
    *<jav:activation-config-property>*
    *<jav:activation-config-property-name>messageSelector</jav:activation-config-property-name>*
    *<jav:activation-config-property-value>JMSCorrelationID LIKE 'ID:424541534594cf52%'</jav:activation-config-property-value>*
    *</jav:activation-config-property>*
    </jav:activation-config>
    <jav:env-entry>
    <jav:env-entry-name>service-ref</jav:env-entry-name>
    <jav:env-entry-type>java.lang.String</jav:env-entry-type>
    <jav:env-entry-value>BusinessService$Test$RequestQ</jav:env-entry-value>
    </jav:env-entry>
    As you can see the message selector is based on JMSCorrelationID LIKE 'ID:424541534594cf52%'. This means the business service will pick only those messages which has its correlation ID starting with ID:424541534594cf52.
    You can see the message selector for your MDB from admin console --> deployments.
    Check and confirm if the correlation ID created in the request also starts with this value and the same is send back from the server. Also try deleting and recreating the business service or rename the business service which will create a new MDB under the hood and check the above.

  • Posting message to JMS queue from Proxy in OSB 10.3

    I am posting a message to a JMS queue using a business service. Is there a way of getting a response from the business service to retrieve the newly generated JMSMessageID?

    I am posting a message to a JMS queue using a business service. Is there a way of getting a response from the business service to retrieve the newly generated JMSMessageID?Yes JMS BS can be configured to get Response though from Different Q.
    Request-JMSBS----->JMS Request Q------your logic outside of BS----->JMS Response Q----->JMSBS-Response. You can use JMSCorrelationID or JMSMessageID for the response correlation.
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/interopjms/transport.html#wp1097863
    Cheers
    Manoj

  • How  to Set JMS property and Read JMS property in BPEL using JMS adapter

    Does any one know how to set or read more than one JMS property in BPEL using JMS adapter. My queue server is Oracle JMS server.
    Any help and sample is well appreciated

    Hi Van
    I have noted that only the attribute "type" is missing. It seems that when you create a "string" property, the attribute "type" is droped from the XML. If you use another type (as "integer" or "double") it stays there.
    If you try to read your properties, except for the "type" attribute, you should be successful, as I am. If you need, please tell me your email, I can send you my code.
    Source Code:
    in ASSIGN activity (process which SENDS the JMS message):
    <assign name="TESTES">
    <copy>
         <from expression="'string'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@type"/>
    </copy>
    <copy>
         <from expression="'name'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@name"/>
    </copy>
    <copy>
         <from expression="'value1'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@value"/>
    </copy>
    <bpelx:append>
         <bpelx:from>
         <Property name="" type="" value=""
              xmlns="http://xmlns.oracle.com/pcbpel/adapter/jms/"/>
         </bpelx:from>
         <bpelx:to variable="HeaderJms" part="outboundHeader"
              query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties"/>
    </bpelx:append>
    <copy>
         <from expression="'string'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@type"/>
    </copy>
    <copy>
         <from expression="'name2'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@name"/>
    </copy>
    <copy>
         <from expression="'value2'"/>
         <to variable="HeaderJms" part="outboundHeader"
         query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@value"/>
    </copy>
    </assign>
    in ASSIGN activity (process which READS the JMS message)
    <assign name="Assign_1">
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[10]/@name"/>
    <to variable="temp"/>
    </copy>
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[10]/@value"/>
    <to variable="temp"/>
    </copy>
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[12]/@name"/>
    <to variable="temp"/>
    </copy>
    <copy>
    <from variable="Variable_1" part="inboundHeader"
    query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[12]/@value"/>
    <to variable="temp"/>
    </copy>
    </assign>
    Note that I do not try to read the "type" attribute, otherwise it will fail.
    Here is the JMS Header Message received:
    <inboundHeader>
    <JMSInboundHeadersAndProperties xmlns="http://xmlns.oracle.com/pcbpel/adapter/jms/">
    <JMSInboundHeaders>
    <JMSCorrelationID>
    bpel://localhost/pi_lms-c001e/BpelPiAtualizacaoC001E~1.0/3200025-BpInv0-BpSeq1.6-2
    </JMSCorrelationID>
    <JMSDeliveryMode>2</JMSDeliveryMode>
    <JMSExpiration>0</JMSExpiration>
    <JMSMessageID>ID:467DFA1FA1ED459EBF37F51F596C3F12</JMSMessageID>
    <JMSPriority>4</JMSPriority>
    <JMSRedelivered>false</JMSRedelivered>
    <JMSType>com.mercurio.lms.integration.c001eip.c001EIntegrationPoint</JMSType>
    <JMSTimestamp>1201552046253</JMSTimestamp>
    </JMSInboundHeaders>
    - <JMSInboundProperties>
    <Property name="JMSXDeliveryCount" type="integer" value="1"/>
    <Property name="JMSXRecvTimestamp" type="long" value="1201552046698"/>
    <Property name="JMSXUserID" value="lms_dev_int_v1_user"/>
    <Property name="JMS_OracleDeliveryMode" value="2"/>
    <Property name="JMS_OracleTimestamp" type="long" value="1201552046253"/>
    <Property name="JMS_OracleDelay" type="long" value="0"/>
    <Property name="JMSXState" type="integer" value="0"/>
    <Property name="IAS_VERSION" value="10.1.3"/>
    <Property name="JMS_OracleDeliveryMode" value="2"/>
    <Property name="name" value="value1"/> ("type" attribute was droped!!!)
    <Property name="JMS_OracleTimestamp" type="long" value="1201552046253"/>
    <Property name="name2" value="value2"/> ("type" attribute was droped!!!)
    </JMSInboundProperties>
    </JMSInboundHeadersAndProperties>
    </inboundHeader>
    Regards
    Marcelo

  • Correlation and Async/Sync Communication using JMS adapter without BPM

    Hello
    1. Pls explain with simple example docs/links --- Correlation
    2. Async/Sync Communication using JMS adapter without BPM
       If i see blog --- If I go with blog --- /people/sudheer.babu2/blog/2007/01/18/asyncsync-communication-using-jms-adapter-without-bpm-sp-19
    Pls explain --- Correlation Settings, select JMSMessageID for the XI Conversation ID.
    Pls explain --  Correlation Settings, select XI Conversation ID as jMSCorrelationID.
    Can you pls explain me this example with JMSMessageID and JMSCorrelationID context
    Regards

    Hi Henry,
    For Correlation, please go through the below link.
    /people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi
    Sync / Async Bridge communication using JMS : http://help.sap.com/saphelp_nw04s/helpdata/en/45/20d251c20a0732e10000000a155369/frameset.htm
    Sync / Async communication without BPM in JMS : /people/venkataramanan.parameswaran/blog/2007/01/18/syncasync-communication-in-jms-adapter-without-bpm-sp19
    /people/henrique.pinto/blog/2007/08/02/syncasync-scenarios-without-bpm
    Hope these help
    Regards
    Kiran..

  • JMSCorrelationID

    Hi,
    I have created communication channel called
    CLIX_JMSQueue_Sync_In with a JMSCorrelationID "XI-Message- ID".
    So, the existing mapping convert idoc to xml and the JMS-CorrelationID should also exist in the xml-file.
    How can I get access to JMSCorrelationID in the mapping?
    Is it possible??
    Thanks.
    Regards
    Stefan

    Hi Stefan,
    as you firstname sounds like German, I still have a version of that OSS Note, it seems like they are working on it:
    SAP-Hinweis Nr. 838894
    Nummer              838894
    Version             2 vom 09.05.2005
    Status              Für Kunden freigegeben
    Gesetzt am          09.05.2005
    Sprache             DE
    Mastersprache       EN
    Kurztext            J2EE JMSAdapter: Korrelation, Sync/Async,
    Async/Sync-Bridges
    Verantwortlich      SAP AG
    Komponente          BC-XI-CON-AFW-TAD
                        Technical Adapter (JMS, JDBC, RFC, SOAP,
    Langtext
    Symptom
    Der Java Message Service (JMS) stellt eine asynchrone
    Messaging-Infrastruktur dar. Er legt zwei Kommunikationsmodelle fest,
    'publish&subscribe' und 'queueing'. Allerdings gibt er kein synchrones
    Kommunikations-Pattern an. Er empfiehlt aber ein bestimmtes Verhalten
    für die Implementierung eines Request/Response-Patterns durch die
    Verwendung von 'ReplyQueue' und 'JMSCorrelationId'.
    Es stellt sich die folgende Frage:
    Wie kann dieses asynchrone Request/Response-JMS-Modell einem synchronen
    Kommunikations-Pattern in XI zugeordnet werden?
    Ein typisches Anwendungsszenario ist das Verbinden von SAP RFC mit JMS,
    eine andere Methode wäre die Zuordnung von JMS zu einem WebService via
    SOAP.
    Es müssen grundsätzlich zwei Fälle unterschieden werden:
    Fall 1. Sync/Async-Bridge: Eine synchrone Nachricht wird einer
    asynchronen JMS-Request-Message zugeordnet und blockiert. Danach wird
    die asynchrone JMS-Response-Message empfangen. Die Bridge ordnet diese
    asynchrone Response der Rückgabestruktur des blockierenden synchronen
    Aufrufs zu und kehrt zurück.
    Fall 2. Async/Sync-Bridge: Eine asynchrone JMS-Request-Message wird
    einem synchronen Aufruf zugeordnet. Wenn dieser zurückkehrt, werden die
    Rückgabewerte einer asynchronen JMS-Response-Message zugeordnet.
    Weitere Begriffe
    XI Adapter Framework, BPE, BPM, ccBPM, AF, IS, Integration Server
    Ursache und Voraussetzungen
    Beratungsfrage
    Lösung
    Die Hauptaufgabe solcher Bridges besteht in der Korrelation (Fall 1)
    oder im Setzen der Korrelationsdaten (Fall 2) der asynchronen
    JMS-Message.
    Wenn die Korrelationsdaten (ein Informationsteil innerhalb der Message,
    der es ermöglicht, dass einem blockierenden synchronen Request eine
    asynchrone Response zugeordnet wird) Teil der Applikations-Payload sind,
    kann XI BPE für die Korrelation (Fall 1) und das Mapping verwendet
    werden und/oder BPE kann zum Setzen der Korrelationsdaten verwendet
    werden. Sowohl die auf der Sync/Async-BPE-Bridge basierte Payload als
    auch das Mapping sind Standardfunktionen, die seit XI 3.0 SP4 und SP0
    zur Verfügung stehen.
    Dokumentation:
    BPE-Sync/Asnyc-Bridge:
    SAP Support Portal (help.sap.com) unter Documentation -> SAP NetWeaver
    -> SAP Library -> SAP NetWeaver -> Process Integration -> SAP Exchange
    Infrastruture -> Overview -> Connectivity -> Sync/Async  Communication
    Mapping:
    SAP Help Portal (help.sap.com) unter Documentation -> SAP NetWeaver ->
    SAP Library -> SAP NetWeaver -> Process Integration -> SAP Exchange
    Infrastruture -> Design and Configuration Time -> Design -> Design
    Mappings
    Für einige Anwendungsszenarien müssen die Korrelationsdaten nicht in der
    Payload sondern als Kopfinformation des verwendeten Protokolls (JMS und
    XI in diesem Fall) gespeichert werden. In diesen Fällen ist es
    notwendig, dass die JMS-Kopf-Korrelationsdaten den
    XI-Kopf-Korrelationsdaten und umgekehrt zugeordnet werden.
    Mit dem XI 3.0 SP12 wird dieses Korrelationsdaten-Mapping mit dem
    XI-JMS-Adapter eingeführt:
    JMS-Senderkanal: JMSMessageId, JMSCorrelationId oder ein Wert einer
    spezifizierten JMS-String-Eigenschaft können der XI ConversationId oder
    der XI MessageId zugeordnet werden. Der XI MessageId kann dies nur
    zugeordnet werden, wenn die ID eine ISO-konforme GUID ist.
    JMS-Empfängerkanal: Die XI MessageId, ConversationId oder RefToMessageId
    kann der JMSCorrelationId oder einer spezifizierten JMS-String-
    Eigenschaft zugeordnet werden.
    Dokumentation:
    JMS-Adapter:
    SAP Help Portal (help.sap.com) unter Documentation -> SAP NetWeaver ->
    SAP Library -> SAP NetWeaver -> Process Integration -> SAP Exchange
    Infrastruture -> Runtime -> Connectivity -> Adapters -> JMS Adapter
    Zusätzlich müssen Sie auf die empfangenen Korrelationsdaten reagieren
    (Fall 1) oder die Korrelationsdaten in XI setzen (Fall 2).
    Der Fall 1 "Kopf-basierte Sync/Asnyc Bridge" wird mit SP12 freigegeben
    und kann mit Hilfe der standardmäßigen BPE-Sync/Async-Bridge
    konfiguriert werden. Die einzige Änderung besteht in der Verwendung der
    XI ConversationId für die Korrelation.
    Der Fall 2 "Kopf-basierte Async/Sync Bridge" ist momentan noch nicht
    freigegeben, da die XI ConversationId weder vom XI BPE noch vom Mapping
    gesetzt werden kann.
    Hinweis ist releaseunabhängig
    Cheers
    Stefan

  • OSB: JMSCorrelationID pattern

    Hello,
    I am trying to switch from JMSMessageID correlation pattern to JMSCorrelationID pattern and have some questions regarding the latter:
    1. For JMSMessageID I have defined one queue per managed server. For the JMSCorrelationID pattern I just define one single queue (reply URL) - how do the managed servers pick their own messages? How is that different from the JMSMessageID pattern where each managed server requires its own queue? Using a message selector does not seem viable as you will need to include the IDs of all the requests for which you are still waiting for responses and they can be pretty much...
    2. Can I use the same response queue for multiple business services using the JMSCorrelationID pattern? As I think about it, can I use the same response queue for multiple business services using the JMSMessageID pattern? I have silently assumed that and it would be pretty bad if not...
    Thanks in advance
    Dimo

    Query 1+:
    I think OSB takes care of this for different managed servers. Under the hood it would create a MDB with a message selector.
    Eg. of ejb-jar for MessageID correlation :_ [ Note no message selectors. MDB receives all messages on the queue ie why you need separate queue per managed server
    <jav:ejb-jar xmlns:jav="http://java.sun.com/xml/ns/javaee">
    <jav:display-name>BEA ALSB JMS Outbound Sync-Async Endpoint</jav:display-name>
    <jav:enterprise-beans>
    <jav:message-driven>
    <jav:ejb-name>ResponseEJB-4075062717979715508-384e89e5.1288d13ed75.-3633</jav:ejb-name>
    <jav:ejb-class>com.bea.wli.sb.transports.jms.JmsAsyncResponseMDB</jav:ejb-class>
    <jav:transaction-type>Container</jav:transaction-type>
    <jav:message-destination-type>javax.jms.Queue</jav:message-destination-type>
    <jav:env-entry>
    <jav:env-entry-name>service-ref</jav:env-entry-name>
    <jav:env-entry-type>java.lang.String</jav:env-entry-type>
    <jav:env-entry-value>BusinessService$Test$RequestQ</jav:env-entry-value>
    </jav:env-entry>
    <jav:env-entry>
    <jav:env-entry-name>XA-supported</jav:env-entry-name>
    <jav:env-entry-type>java.lang.Boolean</jav:env-entry-type>
    <jav:env-entry-value>true</jav:env-entry-value>
    </jav:env-entry>
    </jav:message-driven>
    </jav:enterprise-beans>
    <jav:assembly-descriptor>
    <jav:container-transaction>
    <jav:method>
    <jav:ejb-name>ResponseEJB-4075062717979715508-384e89e5.1288d13ed75.-3633</jav:ejb-name>
    <jav:method-name>*</jav:method-name>
    </jav:method>
    <jav:trans-attribute>Required</jav:trans-attribute>
    </jav:container-transaction>
    </jav:assembly-descriptor>
    </jav:ejb-jar>
    Eg. of ejb-jar for CorrelationID correlation :_ Note the wild card message selector marked in bold. The start prefix for the different servers would change i suppose.
    <?xml version='1.0' encoding='UTF-8'?>
    <jav:ejb-jar xmlns:jav="http://java.sun.com/xml/ns/javaee">
    <jav:display-name>BEA ALSB JMS Outbound Sync-Async Endpoint</jav:display-name>
    <jav:enterprise-beans>
    <jav:message-driven>
    <jav:ejb-name>ResponseEJB-6577847719916437493-3893eeb7.1287d30ba4f.-7fe1</jav:ejb-name>
    <jav:ejb-class>com.bea.wli.sb.transports.jms.JmsAsyncResponseMDB</jav:ejb-class>
    <jav:transaction-type>Container</jav:transaction-type>
    <jav:message-destination-type>javax.jms.Queue</jav:message-destination-type>
    <jav:activation-config>
    <jav:activation-config-property>
    <jav:activation-config-property-name>messageSelector</jav:activation-config-property-name>
    *<jav:activation-config-property-value>JMSCorrelationID LIKE 'ID:424541534594cf52%'</jav:activation-config-property-value>*
    </jav:activation-config-property>
    </jav:activation-config>
    <jav:env-entry>
    <jav:env-entry-name>service-ref</jav:env-entry-name>
    <jav:env-entry-type>java.lang.String</jav:env-entry-type>
    <jav:env-entry-value>BusinessService$Test$RequestQ</jav:env-entry-value>
    </jav:env-entry>
    <jav:env-entry>
    <jav:env-entry-name>XA-supported</jav:env-entry-name>
    <jav:env-entry-type>java.lang.Boolean</jav:env-entry-type>
    <jav:env-entry-value>true</jav:env-entry-value>
    </jav:env-entry>
    </jav:message-driven>
    </jav:enterprise-beans>
    <jav:assembly-descriptor>
    <jav:container-transaction>
    <jav:method>
    <jav:ejb-name>ResponseEJB-6577847719916437493-3893eeb7.1287d30ba4f.-7fe1</jav:ejb-name>
    <jav:method-name>*</jav:method-name>
    </jav:method>
    <jav:trans-attribute>Required</jav:trans-attribute>
    </jav:container-transaction>
    </jav:assembly-descriptor>
    </jav:ejb-jar>
    In case of MessgeID correlation , message with unknown correlation ID is discarded and removed from the response queue. In case of CorrelationID this is not happening. So you may have to setup some redlivery limit to prevent any queue build ups.
    Query 2
    Have not tested, but think would work for correlationID pattern but not for MessageID pattern!
    Regards,
    Atheek
    Edited by: atheek1 on May 12, 2010 8:54 AM

  • BPEL Correlation and inMemoryOptimization + completionPersistPolicy

    Hello,
    I have a problem and I would like to know if it is "as expected" or if there is some workaround.
    I have :
    - a parent BPEL using a reference of type "Adapter JMS : request/reply".
    - declared the properties "inMemoryOptimization" (false) and "completionPersistPolict" (On) on the parent BPEL
    - a child BPEL which expose a service of type "Adapter JMS : consume message" and has a reference of type "Adapter JMS : produce message".
    The child BPEL set the JMSCorrelationID in the response with the JMSMessageID of the request.
    The parent BPEL just invoke the partner link (adapter jms : request/reply).
    If I test my SOA composite like this, all is fine. The parent BPEL call the child BPEL and the response of the child BPEL is correlated correctly.
    Now if I deploy the same SOA composite while setting the "inMemoryOptimization" to "true" and "completionPersistPolicy" to "Faulted", then the correlation doesn't work anymore.
    I suspect that the behaviour is "as expected" since I disabled the BPEL persistence (but it's kind of annoying).
    Can someone confirme that it is normal ? And also if possible what is the minimum persistence policy needed for the correlation feature ?
    thanks in advance,
    mathieu

    This is a feature that we would like to provide in the BPEL SE. In the immediate future we may be able to address this in part specifically the case you mentioned. The other cases that also needs to be addressed is where the incoming message's correlation ID matches with a running instance, but doesn't get consumed because the instance never took the path of consuming the message. These other use cases will be addressed as a feature later.
    thanks,
    -Kiran B

  • Questions about message logging and topic TTL

    We're in the final stages of testing our application. Basically a producer application is sending small, non-persistent messages once every 10 seconds and once every second to an auto-created topic. The consumer application(s) listening are then doing data display of this 1 second and 10 second data.
    Testing the client we noticed it complained of a single 10 second message not being received. We verified that the message was sent by the producer. My question is whether there is a logging setting on the IMQ server that could be used to log the receipt and delivery of every message, perhaps by JMSMessageID to a particular topic? The only idea we could think of is to use 'imqcmd metrics' to track the number of messages in/out, but this isn't as useful for us.
    Any ideas you could provide would be greatly appreciated.

    imqbrokerd does not support tracing at this level, so metrics is probably the best approach for now.
    If a subscriber is not getting a message it is usually because of one of the following:
    1. The message is expiring. If you are using message expiration make sure the clocks are synchronized between the clients and the server. imqbrokerd will log a message when it has expired messages.
    2. The subscriber was down when the message was produced (and it is not a durable subscriber).
    3. You have set a size limit on the destination or system wide that is resulting in messages being shedded as specified by the limit behavior.
    With non-persistent messages you can get an additional level of reliability by setting the following ConnectionFactory property to true:
    ConnectionConfiguration.imqAckOnProducethis adds a handshake between the server and client when a message is sent and provides a mechanism for imqbrokerd to propogate additional message production errors back to the client.
    The following document at sunsolve.sun.com provides more details:
    ID70117 Sun Java[TM] System Message Queue: Tuning 3.0.1 and 3.5 For Robustness
    Joe
    http://wwws.sun.com/software/products/message_queue/

Maybe you are looking for