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.

Similar Messages

  • JMS Message printing 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 please help me out with this
    Thanks in advance
    Balagopal

    Why dont you send a TextMessage instead of a BytesMessage? Something like:
    String message = "Hi, what's up?";
    TextMessage textMessage = queueSession.createTextMessage(message);
    queueSender.send(textMessage);And then at the receiver's end:
    QueueReceiver queueReceiver = session.createReceiver(ioQueue);
    Message message = queueReceiver.receive(Long.parseLong(pollTime));
    if (message instanceof TextMessage) {
                 * Since message is an instance of TextMessage, cast it to TextMessage to get access to
                 * APIs available on TextMessage
                TextMessage textMessage = (TextMessage) message;
                  System.out.println("Message received: " + textMessage.getText());
    }

  • Message reader problems after Microsoft Apps insta...

    My previous thread was delete due to forum rules infringment.
    I describe here again my problem, hoping to have a solution and considering that the problem I faced was not my fault, but it happened after a Nokia official update downloaded via Ovi Suite.
    On 15th of April I've installed the Microsoft Apps and after my C6-01 reboot I found that the application "message reader" does not work anymore (tapping on the blue icon in the homescreen had no effect).
    The only way to use the message reader was going in the incoming SMS folder, select a message anoose "LISTEN" from the menu. In this way the reader works.
    Some days ago someone in this forum suggested me to remove the configured mailbox and try; in this way the reader came back to life and worked again, but if I add a mailbox the problem come back and the reader is malfunctioning again. So the only way to have this application working is removing any mailbox from my C6-01.
    Therefore, considering that this problem occurred after an official update from Nokia and not for an user's error, I would like that Nokia tell me how to solve this malfunction.
    Thanks for your attention and forgive my poor english.

    After the first time I installed Micro$oft App$ I did a deep reset pressing the four keys as described in a web site I've found. After this procedure my C6-01 rebooted without many applications, so I have connected it to Ovi Suite and restored the firmware. The result was a "brand new" and perfect phone, until the new installation of M$ Apps on 11th of April :-(
    So we are three Nokia users with the same problem... and we will faithfully wait for a fix ;-)

  • 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.

  • JMS Messaging Bridge Problems with WLS 8.1 sp2

              Thank you in advance for your help.
              I am trying to configure a JSM Messaging Bridge to connect an MQ Q to a Weblogic
              Q. I have this working wonderfully in an environment without clustering but once
              I try to deploy to a cluster, I am having two major problems.
              1) When the managed servers are restarted, the messaging bridges immediately complain
              about not being able to find the resource adaptor. After I manually un-target
              the messaging bridge from the cluster and re-target them, they find the resource
              adaptor but cannot connect to the source... which leads to my next problem.
              2) The messaging bridges cannot connect to the source destination whether it is
              an MQ Q or a Weblogic JMS Q does not matter. Here are the log entries that I
              see relative:
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging STARTUP! Got Notification:weblogic.management.AttributeAddNotification:
              Deployments from <null> to [Caching Stub]Proxy for eBusDev02:Location=secaServer01,Name=seca_OES_ADV_REPLY
              Messaging Bridge,Type=MessagingBridgeConfig - weblogic.management.AttributeAddNotification[source=eBusDev02:Location=secaServer01,Name=secaServer01,Type=ServerConfig].>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging STARTUP! creating bridge seca_OES_ADV_REPLY Messaging
              Bridge.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging STARTUP! Bridge seca_OES_ADV_REPLY Messaging Bridge
              is deployed as a migratable.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging RUNTIME! Initializging bridge seca_OES_ADV_REPLY Messaging
              Bridge as a migratable.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging STARTUP! Bridge seca_OES_ADV_REPLY Messaging Bridge's
              source configurations are:
              AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
              Classpath=null
              ConnectionURL = file:/e:/private/JNDI/eBusDev02
              DestinationType = Queue
              DestinationJNDIName = jms.oes.MQ-ADV-REPLYQ
              InitialContextFactory = com.sun.jndi.fscontext.RefFSContextFactory
              ConnectionFactoryJNDIName = jms.oes.MQ-QCF
              .>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging STARTUP! Bridge seca_OES_ADV_REPLY Messaging Bridge's
              target configurations are:
              AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
              Classpath=null
              ConnectionURL = t3://30.135.10.63:8103,30.135.10.63:8104
              DestinationType = Queue
              DestinationJNDIName = jms/oes/ADV-REPLYQ
              InitialContextFactory = weblogic.jndi.WLInitialContextFactory
              ConnectionFactoryJNDIName = jms/oes/QCF
              .>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging STARTUP! Bridge seca_OES_ADV_REPLY Messaging Bridge
              is successfully initialized.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging RUNTIME! Bridge seca_OES_ADV_REPLY Messaging Bridge
              has been successfully initialized as a migratable.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging RUNTIME! Activating bridge seca_OES_ADV_REPLY Messaging
              Bridge.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '1' for queue: 'weblogic.admin.RMI'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging RUNTIME! Bridge seca_OES_ADV_REPLY Messaging Bridge
              has been successfully activated..>
              ####<Apr 1, 2004 4:38:44 PM EST> <Info> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-200033>
              <Bridge "seca_OES_ADV_REPLY Messaging Bridge" is obtaining connections to the
              two adapters.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Debug> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-200006>
              <Messaging bridge debugging RUNTIME! Bridge seca_OES_ADV_REPLY Messaging Bridge
              Getting source connection.>
              ####<Apr 1, 2004 4:38:44 PM EST> <Info> <MessagingBridge> <dv2kwls03> <secaServer01>
              <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-200042>
              <Bridge seca_OES_ADV_REPLY Messaging Bridge failed to connect to the source destination
              and will try again in 15 seconds. (java.lang.NullPointerException)>
              I know the queues are up and I am pretty sure my MQ client configuration is correct.
              Is there anyway to get more information about the NullPointerException or the
              error being encountered?
              

    Given that you have ruled out message backlogs, my first suspicion is that the leak has something to do with connection allocation. Does JMS stats reveal an application generated connection leak? Check to see if the current number of connections/sessions stays steady.
              If this doesn't help, you can use a third party tool like OptimizeIt to get periodic snap-shots of memory usage and identify the leaked object (or create a reproducer and have customer support do it). A possible work-around is to modify your app to pool JMS connections/sessions for re-use - greatly reducing the number of connections created per day.
              Tom

  • 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.

  • JMS Adapter Message Selector Problem...

    Hi
    I have set the following in the invoke before producing the message and dropping on the queue
    <invoke name="Invoke_1" partnerLink="adapt"
    portType="ns1:Produce_Message_ptt"
    operation="Produce_Message"
    inputVariable="Invoke_1_Produce_Message_InputVariable"
    bpelx:inputHeaderVariable="Sender"/>
    On the receive side I have the message selector configured for the adapter as follows:
    <jca:operation
    ActivationSpec="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec"
    DestinationName="dattjndi"
    UseMessageListener="false"
    MessageSelector="Sender=AdaptationRequest"PayloadType="TextMessage"
    OpaqueSchema="false" >
    </jca:operation>
    Where AdaptationRequest is the value for the Sender variable which will be used to filter the message. But this does not work. the messages are still not consumed. What could be the problem?
    Thanks,
    Anil

    did you check the message selector section on
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html
    explains all the operators you can use and the correct syntax. Make a note of the case sensitivity.

  • I am having a major problem connecting to FaceTime. Message reads "unable to connect, check network connections". Yet I am online with Manila, Safari etc. any suggestions.

    I am having a major problem connecting to FaceTime today.  Message reads "unable to connect, check network connections".  I am online, mail works, ex
    Tc.  This was not a a problem two days ago.  Any suggestions?

    Could be that the servers are overloaded today.

  • Error Message reads: this application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem.  I have re-installed, SO many times and I still cant open iTunes.

    Hi Support,
    I am becoming anxious because no matter what I try it doesnt seem to allow me to open itunes.
    Error Message reads: this application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem.
    I have re-installed, SO many times and I still cant open iTunes.
    Please help!!

    Click here and follow the instructions.
    (98888)

  • I have an Ipad 2 and are having problems sending out emails in one of my email address. I always get a message reading the email was not sent because the server does not allow relaying. This is an email account POP3. I have no such problem with gmail.

    I have an Ipad 2 and are having problems sending out emails in one of my email address. This is a POP3 email Account? I always get a message reading that the email was not sent because the server does not allow relaying. I have no such problem with gmail. What could be the problem and how do I resolve this. Is it about settings?
    Richard.

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • I need help in resolving a problem that prevents me from accessing the iTunes store.  Message reads " iTunes cannot contact the iTunes store" and also says that my laptop is no longer authorized to access my account.  Help!

    I need help in resolving a problem that prevents me from accessing the iTunes store.  Message reads " iTunes cannot contact the iTunes store" and also says that my laptop is no longer authorized to access my account.  Help!

    Go up to the top of your screen on iTunes and click on 'Store'.  Then go down to 'Authorize This Computer'.  That should cover part of it unless you've already authorized a bunch of other computers to use your account.  If that's the case, you'll have to go to one of those computers and click the button just below it to 'deauthorize your account' from that computer.  If you're not able to access the store, check your internet connection to make sure you are connected.  Hope this helps.. good luck!     

  • 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). ???

  • Help! I have recently updated LR5 and before doing so I was able to email files to clients! (Very Convenient) Now my problem is I have not been able to get pass this error message reading "failed to send" which gives no further detail about what to do to

    Help! I have recently updated LR5 and before doing so I was able to email files to clients! (Very Convenient) Now my problem is I have not been able to get pass this error message reading "failed to send" which gives no further detail about what to do to rectify the situation. Someone please guide me through this! Thanks in advance!

    Did this ever get resolved, as I am having the same issue.  Trying to learn LR5 AFTER a decade using Aperture.   I was able to set up a validated account but when I try to send an e-mail or photo I get the simple " Failed to Send " message.   Using latest version of Mac OS X.

  • 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 ?

  • WLI/JMS Message problem

    I have written a WLI client program that has JMS listeners for assigned, update,
    and remove WLI Notify messages. The basic format for each selector is simple:
    orgId = 'ORG1' and action = 'assigned'
    I've noticed an inconsistency when it comes to the JMS messages sent to my application.
    Say Task A is configured to be assigned to Joe when it's activated. When the
    task is actually activated, my client program receives an update message followed
    by an assign message (both for that task).
    Okay, here's where it gets tricky. Say the workflow returns to Task A later on
    in the same instance of the workflow. This time my client only gets an update
    JMS message. I have to account for this inconsistency in my code, which is not
    good.
    Is this a bug, or is there a reason that this is behaving like this?

    David
    Please open a case or provide your demo code to me, I will take a look
    when I get some free time
    Tony
    "David Mrozek" <[email protected]> wrote in message
    news:3b852200$[email protected]..
    >
    I have written a WLI client program that has JMS listeners for assigned,update,
    and remove WLI Notify messages. The basic format for each selector issimple:
    >
    orgId = 'ORG1' and action = 'assigned'
    I've noticed an inconsistency when it comes to the JMS messages sent to myapplication.
    >
    Say Task A is configured to be assigned to Joe when it's activated. Whenthe
    task is actually activated, my client program receives an update messagefollowed
    by an assign message (both for that task).
    Okay, here's where it gets tricky. Say the workflow returns to Task Alater on
    in the same instance of the workflow. This time my client only gets anupdate
    JMS message. I have to account for this inconsistency in my code, whichis not
    good.
    Is this a bug, or is there a reason that this is behaving like this?

Maybe you are looking for