Reading jms message

how to read the data from jms message, any articles / ideas please direct me.

how to read the data from jms message, any articles / ideas please direct me.

Similar Messages

  • How to read JMS message properties from BPEL or BPMN process

    Hi all,
    I have a JMS Adapter that consumes messages from a remote ActiveMQ queue and I don't find the way the get the properties of the JMS message as I would like to map them in BPEL or BPMN process variable. I only manage to get the content of the message.
    I've also read that if using a MapMessage, one of the map entry can be mapped directly and that the other map entries go to jca.jms.Map.xxxx where xxxx is key of the map entry.
    But how can I map those "jca.jms.Map.xxxx" properties on process variables ? and how to map JMS Properties (that seem to be mapped on jca.jms.JMSProperty.xxxx) to process variables ?
    I use SOA Suite version : 11.1.1.4.0
    Thanks for your help

    SOA Suite 11g - how to set/get JMS headers ?

  • Error reading jms message from MQ-queue

    Hi,
    To be able to use async-sync bridge in JMS adapter, we recently patched XI 3.0 from SP 15 to SP21. But the jms sender adapter has problem reading the message from the MQ-queue, see detail of error-message at the end of this message.
    I did change the adapter to use modules use RequstResponseBean and ResponseOneWayBean as explaned on help.sap.com.
    The async-sync bridge worked once and the it started failing.
    Detailed error message in communication channel monitoring:
    Error while processing message '3c5a0640-9c03-11dc-82f2-000255d3bbf7';  detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Could not begin a AF transaction: TxManagerException: Unable to open transaction: com.sap.engine.services.ts.exceptions.BaseSystemException at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:103) ...
    /Maria Lande

    Hi,
    I fixed it myself. I hade to do a Xi Data Cahe Refresh.
    Navigate to Administration section on the SAP Exchange Infrestructure start page. On the Directory tab page, choose Cache overview under the heading Administration of Locks and Caches. Do a Full Cache Refresh on the adapter engine.
    /Maria Lande

  • Problem reading JMS message received from MQSeries

    I have a message listener listening on an MQSeries queue.
    I'm expecting a text message back, but what I get is
    partially listed below.
    Any idee's to what I need to do would be greatly received.
    thanks
    JMS Message class: jms_bytes
    JMSType: null
    JMSDeliveryMode: 2
    JMSExpiration: 0
    JMSPriority: 0
    JMSMessageID: ID:414d51205344454e44553031202020203dc7e0ff00223082
    JMSTimestamp: 1038261667350
    JMSCorrelationID:null
    JMSDestination: null
    JMSReplyTo: null
    JMSRedelivered: false
    JMSXDeliveryCount:1
    JMS_IBM_MsgType:8
    JMSXAppID:MQSeries Client for Java
    JMS_IBM_Format:
    JMS_IBM_Encoding:273
    JMS_IBM_PutApplType:28
    JMS_IBM_Character_Set:ISO8859_1
    JMSXUserID:mqm
    JMS_IBM_PutTime:22010735
    JMS_IBM_PutDate:20021125
    Integer encoding: 1, Floating point encoding 256
    3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e3c52
    65706c79437573746f6d65725374617475735f3030313e3c434e54524f4c415245413e3c4253523e

    I have a temporary/partial solution to this problem.
    As we control the application adapter that is posting messages to the MQSeries queue, we have changed the sender to put the text into the bytes message object using writeUTF rather than writeText that it was using. My reader the does a readUTF.

  • UTF-8 enabling JMS message read from MDB

    Hi,
    I need to read a Chinese name from the JMS topic through the onMessage event of a EJB3.0 MDB. I'm using the ESB 10.1.3 JMS adapter to push data into my DemoTopic.
    But, when I read the JMS message from the MDB, I get '????' as part of Chinese name value.
    How and where do I have to set the character set to UTF-8?
    Vikas

    Check where your MDB sends the [response] messages to.

  • How to read mq message through jms

    Hi
    can anyone tell me how we can read an mq message through jms transport or by using jms adapter.
    Thanks in advance.

    A JMS program will be written typically to lookup administered objects ( namely connection factory and destination) from a jndi tree and use these to connect to the jms provider and read/write message to the destination. So administrators of the JMS provider usually create these objects and bind it to a jndi , which then can be used by the jms applications by doing a lookup from the jndi tree.
    Websphere MQ is a messaging provider which provides a native MQ API in many languages including Java for applications to talk to it. This is a IBM proprietary API and is not same as JMS. Later when JMS became more interoperable and the standard for java based messaging applications, IBM introduces the MQ JMS API which is a wrapper around the native MQ API, so that now java clients can talk to MQ using the JMS API. Since jms applications need to lookup the administered objects, IBM came up with the utility called JMSAdmin which allows MQJMS administers to create and bind JMS administered objects. The utility is flexible that it allows the objects to be binded to different type of JNDI trees - file based, ldap based etc. But the most widely used and robust one is the file based.
    So as part of configuration the first thing is to create the queue and queue manager objects by the MQ Administrator.
    A MQ JMS administrator will then create the JMS wrapper objects using the JMSAdmin utility and bind it to the file based jndi tree ( a file called .bindings)
    Now we need the application running in weblogic server ( the JMS Adapter ) to lookup these objects from the file based jndi tree. So for this we create a foreign jms server. A foreign jms server allows to create local jndi links (in weblogic's server jndi tree) for objects in a remote jndi provider (the .bindings file).
    Finally the application will look up the local jndi name from the local jndi which will automatically resolve to the remote provider and use it.
    The steps in the IBM developer work link folliows this sequence.
    Hope this helps.

  • JMS Message reading problem

    Hi all
    I have a problem with MQJMS...I am successful in putting the message to the queue and also reading it...but the problem is that i was trying to put a string message in the queue...but i am not able to read the original string from the message.this is the code i used....
    Putting the message in the queue
    String Buffer = "Message";
    boolean transacted = false;
    session = qconnection.createQueueSession( transacted, Session.AUTO_ACKNOWLEDGE);     
    BytesMessage message =
    session.createBytesMessage();
    message.setJMSType("DATAGRAM");               
    message.setStringProperty("Fmt","PLAINTEXT");               
    message.writeBytes(Buffer.getBytes());                              
    qSender = session.createSender(ioQueue);               
    qSender.send(message);
    Reading the message from the queue
    QueueReceiver queueReceiver = session.createReceiver(ioQueue);     
    Message msg = queueReceiver.receive(Long.parseLong(pollTime));     
    If I try to print the msg i am getting the details as
    JMS Message class: jms_bytes
    JMSType: String
    JMSDeliveryMode: 2
    JMSExpiration: 0
    JMSPriority: 4
    JMSMessageID: ID:414d5120454149544553544d47522020456e8f002004d901
    JMSTimestamp: 1165040197487
    JMSCorrelationID:null
    JMSDestination: queue://EAITESTMGR/BALU.IN
    JMSReplyTo: null
    JMSRedelivered: false
    JMSXDeliveryCount:1
    JMS_IBM_MsgType:8
    Fmt:PLAINTEXT
    JMSXAppID:java
    JMS_IBM_Format:
    JMS_IBM_Encoding:273
    JMS_IBM_PutApplType:6
    JMS_IBM_Character_Set:UTF8
    JMSXUserID:eaijdev
    JMS_IBM_PutTime:06163748
    JMS_IBM_PutDate:20061202
    Integer encoding: 1, Floating point encoding 256
    54484953204d45535341474520495320564941204a4d53204348414e4e454c
    But the thing i need is to get the same string value ie Message
    Anyone out there could please help me out with this
    Thanks in advance
    Balagopal

    See: http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html
    BTW you are diplaying the toString() value of the Message object itself. You need to call the Message class's method to get the message out of the Message object.

  • Read JMS Map message in BPEL

    Hi all,
    I am trying to read JMS Map message in BPEL. Below is the message which is consumed from the JMS queue by JMS adapter.
    <Receive1_Consume_Message_InputVariable>
    <part  name="body">
    <MapMessage> <entry  name="createUser"  dt="String">jcooper</entry>  
    <entry  name="Operation"  dt="String">INSERT</entry>
    <entry  name="CorrelationId"  dt="Long">2345</entry>
    </MapMessage>
    </part>
    </Receive1_Consume_Message_InputVariable>
    How to traverse all the key and name value pairs? Is there any function in XSLT to achieve this? Please let me know.
    Thanks

    I publish a JMS message to a topic in one BPEL process and have another BPEL process read from the topic and start the flow. The problem I have is that the first process is writing fine to the topic, but the second process seems to be reading twice. I am seeing two instances of the second process in em.
    Can anyone help? I am using JDev 11.1.1.1.0
    Thanks

  • I want to use ODI to read XML messages from JMS queue and then process it..

    I want to use oracle ODI (Oracle Data Integrator) to read XML messages from JMS queue and then process it.. i also want to process and validate the data in it....
    Could anyone please tell me the steps to achieve the same. I tried some ways which i got on OTN, but not able to implement it exactly...
    As i m very new to ODI, it will be great if you provide detailed steps..
    Thanks in advance for your help....

    Hi,
    Were you able to do it? We are facing this same issue now and, despite the fact the docs say otherwise, it does not seem to be a trivial task.
    TIA,
    Tedi

  • Lost (and found) JMS - messages

              Using WLS 6.1 and have experienced that JMS messages has not been delivered to
              its consumer correctly. We are interested in any suggestions to what has happend,
              what can be done to avoid the problem in the future, or perhaps how we can find
              out more about the problem.
              We have a message driven bean A which sends messages to the queue Q, of which
              the message driven bean B is the only consumer.
              What we recently have experienced is that some of the messages delivered by A
              to Q never are delivered to B. But the messages seems to be persisted correctly,
              because after a restart they reappear!
              Following is a more detailed description of the scenario:
              1. A message is sendt with DeliveryMode=PERSISTENT and TimeToLive=0. QueueSender.send
              is invoked and returns normally.
              2. The consumers never gets the message (B.onMessage i never invoked with this
              message).
              3. Point 1-2 is repeated for 13 different messages over a period when ~100 similar
              messages are delivered normally.
              4. The server is then restarted.
              5. In the starup log it is indicated that 44 records are found in the JMSStore.
              6. When the server restarts, the "lost" messages gets delivered to B.
              After the server restart we have not experienced the problem again.
              Logs does not show anything unusual about the previous restart.
              Other details:
              There is always exatly 1 instance of A running, and 5-20 instances of B. A implements
              and uses a pool of javax.jms.XAQueueSession instances, which shares a single instance
              of javax.jms.XAQueueConnection. The aknowledge-mode for B is "Auto-aknowledge".
              We're using Weblogic Server 6.1.3.0 / Red Hat Linux 7.3.
              Any help on this problem is appreciated!
              

              I believe we've seen just the behaviour you describe on 6.1 SP2, but only on a
              multi-cpu box (Solaris), and only under load. We can't reproduce the problem reliably,
              and get no error messages/warnings anywhere, so very little to send to customer
              support; by the time we notice this, the problem's long passed, so a thread dump's
              of no use.
              We're going to try and see how SP5 (which has loads of JMS fixes) pans out.
              But if you find anything out, could you post here?
              simon.
              "Harald Stendal" <[email protected]> wrote:
              >
              >Using WLS 6.1 and have experienced that JMS messages has not been delivered
              >to
              >its consumer correctly. We are interested in any suggestions to what
              >has happend,
              >what can be done to avoid the problem in the future, or perhaps how we
              >can find
              >out more about the problem.
              >
              >We have a message driven bean A which sends messages to the queue Q,
              >of which
              >the message driven bean B is the only consumer.
              >What we recently have experienced is that some of the messages delivered
              >by A
              >to Q never are delivered to B. But the messages seems to be persisted
              >correctly,
              >because after a restart they reappear!
              >
              >Following is a more detailed description of the scenario:
              >
              >1. A message is sendt with DeliveryMode=PERSISTENT and TimeToLive=0.
              >QueueSender.send
              >is invoked and returns normally.
              >2. The consumers never gets the message (B.onMessage i never invoked
              >with this
              >message).
              >3. Point 1-2 is repeated for 13 different messages over a period when
              >~100 similar
              >messages are delivered normally.
              >4. The server is then restarted.
              >5. In the starup log it is indicated that 44 records are found in the
              >JMSStore.
              >6. When the server restarts, the "lost" messages gets delivered to B.
              >
              >After the server restart we have not experienced the problem again.
              >
              >Logs does not show anything unusual about the previous restart.
              >
              >Other details:
              >There is always exatly 1 instance of A running, and 5-20 instances of
              >B. A implements
              >and uses a pool of javax.jms.XAQueueSession instances, which shares a
              >single instance
              >of javax.jms.XAQueueConnection. The aknowledge-mode for B is "Auto-aknowledge".
              >
              >We're using Weblogic Server 6.1.3.0 / Red Hat Linux 7.3.
              >
              >Any help on this problem is appreciated!
              >
              

  • Problem in sending JMS message on remote OC4J

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

  • How to stop and start MDBs to listen for JMS messages

    Hello! This might be more of an architecture question rather than a technical questing, but I post it here, in the lack of a better place...
    For several years I have been using Webster and Webster MQ to send messages back and forth to clients. The architecture for the middleware platform has been designed around the functionality of ListenerPorts. Listenerports is a Webster functionality that let you "stop" and start to listen to JMS messages for a given MDB either by admin console, or by JMX.
    The arhitecture we used was something like this :
    1.Client sends a persistent message to a queue. (order)
    2. An MDB pics up the order message, calls a SessionBean that "fronts" the IIOP back end system.
    This is quite "out of the box" architecture, but we used the Listenerports to solve a stability problem for our back end system.
    The backEnd system was quite unstable, so the EJB threw an exception (typically because of timeout or connection refused) back to the MDB.
    The Listenerport was "defined" to handle 3 errors before stopping, so the MDB resent the message twice before the listenerport automatically stopped. The nice thing about this feature was that the client could continue to send orders, and was not bothered when the back end system was down.
    When the backEnd system was up and running, we could start the listenerport and it was all back to normal state. We even had a start script that checked the state of the listenerport every 30 minute, and started it automatically if it was stopped, making the admin task of starting the MDB unnecessary..
    Now.. Why am I telling this story..
    I would like to know how this could be done using "clean" J2EE technologies..That is..Not using any technology that is not portable..
    I`m playing with glassfish at home, and it struck me that there is nothing in the J2EE spec that defines the functionality described above ? Am i missing something ?
    I Do not want to stop My application because the back end system is down? That is the only way (i know of) that i can "stop" to listen for messages..
    I can put all the messages on an error queue when the backbend system is down, but that would lead to more code just to handle the error messages. Maybe the easiest way to solve this is to "move" (programmatically) all messages from the error queue over to the "standard" queue every XX minute, but somehow that sounds "wrong"
    Can anyone give me some advice to how this problem situation should be solved ? I`m interested in the solution both from an architectural perspective and from a more technical perspective..
    Best regards
    Hans-Jacob Melby

    Breakpoints, whether normal or conditional, are just meant for debugging of your code.  I had the sense from your question that the pausing you want to do is a part of normal operation of your code.  I would NOT recommend using a breakpoint for that situation.  It would bring up the block diagram showing the breakpoint when it occurs.  A user besides the programmer would not know what to do in that case.
     Yes, both the inner and outer loops would have shift registers.
    Putting a case structure with a small while loop inside the "Pausing Case" is doable.  It just depends on what you are doing or waiting for while the program operation is "paused".

  • What is the recommended way for persisting JMS messages?

    What is the recommended way for persisting JMS messages?. As per the IMQ admin documentation , using the default built-in persistence type which is through unix flat files is much efficient and faster, compared to the database persistence .
    Tried setting up the jdbc stuff for database persistence on iAS 6.5 . I am getting the following
    error .
    [24/Apr/2002:16:09:20 PDT] [B1060]: Loading persistent data...
    [24/Apr/2002:16:09:21 PDT] Using plugged in persistent store: database connection
    url=jdbc:oracle:thin:@dbatool.mygazoo.com:1521:qa1 brokerid=ias01
    [24/Apr/2002:16:09:23 PDT] [B1039]: Broker "jmqbroker" ready.
    [24/Apr/2002:16:11:56 PDT] ERROR [B4012]: Failed to persist interest
    SystemManager%3ASystemManagerEngine%2BiMQ+Destination%0AgetName%28%29%3A%09%09SM_Response%0AClass%3A%09%09%09com.sun.messaging.Topic%0AgetVERSION%28%29%3A%09%092.0%0AisReadonly%28%29%3A%09%09false%0AgetProperties%28%29%3A%09%7BJMQDestinationName%3DSM_Response%2C+JMQDestinationDescription%3DA+Description+for+the+Destination+Object%7D:
    java.sql.SQLException: ORA-01401: inserted value too large for column
    [24/Apr/2002:16:11:56 PDT] WARNING [B2009]: Creation of consumer SM_Response to destination 1
    failed:com.sun.messaging.jmq.jmsserver.util.BrokerException: Failed to persist interest
    SystemManager%3ASystemManagerEngine%2BiMQ+Destination%0AgetName%28%29%3A%09%09SM_Response%0AClass%3A%09%09%09com.sun.messaging.Topic%0AgetVERSION%28%29%3A%09%092.0%0AisReadonly%28%29%3A%09%09false%0AgetProperties%28%29%3A%09%7BJMQDestinationName%3DSM_Response%2C+JMQDestinationDescription%3DA+Description+for+the+Destination+Object%7D:
    java.sql.SQLException: ORA-01401: inserted value too large for column
    Any thoughts?

    From the output, you are using imq 2.0. In that release
    the key used to persist a durable subscriber in the database
    table has a limit of 100 characters. The output shows that
    your value is:
    SystemManager%3ASystemManagerEngine%2BiMQ+Destination%0AgetName%28%29%3A%09%09SM_Res
    ponse%0AClass%3A%09%09%09com.sun.messaging.Topic%0AgetVERSION%28%29%3A%09%092.0%0Ais
    Readonly%28%29%3A%09%09false%0AgetProperties%28%29%3A%09%7BJMQDestinationName%3DSM_R
    esponse%2C+JMQDestinationDescription%3DA+Description+for+the+Destination+Object%7D:
    which is much longer than 100 characters.
    You might want to shorten the string you use for the
    durable name.
    And yes, the default file-based persistence store is
    more efficient when compared to the plugged-in persistence
    through a database.

  • How to parse XML content in JMS Message...

    Hi everybody,
    I am currently developing a Message-Driven Bean and has some problem parsing the XML data that contains in the JMS body.
    The XML data is contained in TextMessage (JMS message type) and in order to parse the data, I need to use the DOM builder, which is expecting to read from a file (e.g. abc.xml).
    My question is how can I use TextMessage (can be output to a String) as the input source instead of a file.
    Thanks in advance.

    Hi Boon,
    "Boon Keong" <[email protected]> wrote in message
    news:3dd46800$[email protected]..
    I am currently developing a Message-Driven Bean and has some problemparsing the XML data that contains in the JMS body.
    >
    The XML data is contained in TextMessage (JMS message type) and in orderto parse the data, I need to use the DOM builder, which is expecting to read
    from a file (e.g. abc.xml).
    >
    My question is how can I use TextMessage (can be output to a String) asthe input source instead of a file.
    What about this:
    DocumentBuilder db = ...
    Document doc = db.parse(new InputSource(new
    StringReader(textMessage.toString()));
    or
    Document doc = db.parse(new
    ByteArrayInputStream(textMessage.toString().getBytes()));
    Regards,
    Slava Imeshev

  • JMS messages stuck in queue in weblogic v923 cluster

    Hi all,
    Enviornment details:
    In our pre-production weblogic v923 cluster enviornment with Oracle 10g database, there are 10 server boxes with 2 managed nodes running on each server box in linux enviornment.
    There are 3 JMS queues and 1 error queue per managed node.
    All the queues are durable and the persitence store is a database table. There is a single database table per single managed node.
    High loads of JMS messages from client applications coming on each of the 3 JMS queue are processed by the cluster on daily basis.
    The JMS messages that failed to be processed the very first time due to the application logic exceptions are put on error queue since the retry is set to zero on the non-error queue.
    The application exceptions are logged to a database table for futher reference.
    The falied messages from the error queue are read by spring based MDP and resent to the application for reprocessing.
    If no application exceptions, the message will be persisted in a relational database; in the case of failures, MDP code puts the failed message back on to the error queue.
    The auto_ack is true on the JMS message.
    It is observed about less than 1% of the messages fail the original processing and are in error queue on daily basis.
    99.9% of the time, the reprocessing of the messages from the error queue is a success.
    Currently due to some obvious reasons, the system administrator stops a managed node when the disk is full and start a different managed node on the same server box. This approach will be stopped in the very near future so that all nodes on all servers are running at any point of time by making few enviornment changes.
    Problem:
    1a) Occasionally, it is observed that 1 - 4 JMS messages are stuck in the error queue. There are no signs of reprocessing as there are no application exceptions or the corresponing insert into the database. The JMS persistence store table still has the JMS message.
    1b) It is observed that over time, the same JMS messages that were originally stuck on server 1's managed node A are no longer there but are found in a different node (say node B) on a different server box.
    As far as I understand the JMS, a message could be in a Pending state if MDP (in my case) does not automatically send ACKNOWLEGMENT back due to an issue in the Spring Defaultlisternercontainer before calling MDP's onMessage(). I am not sure as what happens to that status over time).
    It is also observed that the stuck messages content is not much different than the other messages that are processed fine.
    Any pointers/input is highly appreciated.
    Thanks in advance for your valuable input and time.

    Off the top of my head, I can only think of two reasons why a message might move from node to node:
    (A) An application is dequeueing them and enquening them elsewhere.
    (B) The application is using distributed queues, and the distributed queue has been configured to enable "queue forwarding". The forwarding feature automatically moves messages from distributed queue members that have no consumers to members that do have consumers. Queue forwarding is sometimes enabled as a work-around to better enable MDP support of WL distributed destinations, unlike WebLogic MDBs, MDPs have no container logic to ensure that all members of a distributed destination are serviced by a consumer under all circumstances...
    Regards,
    Tom

Maybe you are looking for