JMS Message stays in AQ Topic

Hello,
i have a strange problem with 10.1.2 AS and 10.1.0.4 DB:
First, i created the Topic in the database:
dbms_aqadm.create_queue_table(
     queue_table => 'ADMINTABLE',
     queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',
     sort_list => 'PRIORITY,ENQ_TIME',
     multiple_consumers => TRUE,
     compatible => '10.0');
dbms_aqadm.create_queue(
     queue_name => 'AdminTopic',
     queue_table => 'ADMINTABLE');
dbms_aqadm.start_queue(
     queue_name => 'AdminTopic');
Second, i deployed a MessageDrivenBean on that topic as a NonDurable Subscriber.
Sending and receiving messages works fine, but the messages are not removed from the Topic. I think this is because OC4J registered two subscribers on the topic. How can this be within a single instance configuration?
Any ideas?
Thank you!

I was wrong - setting the aq_tm_processes > 0 didn't solve the problem. On the very first try it seems to work, but the subsequent tries showed the same problem again.
The documentation says, that this parameter is deprecated since 10g...
A few days ago the DB was patched to 10.1.0.5, without solving this issue.
The problem is, that NonDurable Subscribers aren't directly supported by Oracle AQ, so they use faked Durable Subscribers for complicance with J2EE 1.3, which can be seen in the table AQ$_QUEUENAME_S with a name like 'TSUB_1_XXXXXXXXXXXXXXXX'.
In our application there is only one MDB which subscribes to the Topic, but two subscribers are shown in the table. And on every redeployment two more subscribers are added to Topic...
A similar issue exists under Metalink ID 3601748, but should be fixed since 10.1.0.2.

Similar Messages

  • JMS message stills exists in topic one the message written in folder

    Hi Everyone.
    My project is simple. getting the file from a location and placing the file in jms topic.
    consuming the file from topic and placing the file in 5 folders.
    I had an issue: i can find messages still exists in topic after successfully writing the messages in folder.
    It is not particular to one file. It keeps on varying...
    Can anyone guide in this issue.what can i do, to avoid the message in topic after successfully writing the file in target location

    Hi,
    Are you sure the messages in the topic are placed in the folder. Can you check the timestamp of the messsages in the topic and in the folder.

  • When using rabbitmq-jms for vFabric RabbitMQ javax.jms.Message.getJMSDestination does not return the actual destination when it is received from a consumer listening on a Topic with a wild card

    When using rabbitmq-jms for vFabric RabbitMQ javax.jms.Message.getJMSDestination does not return the actual destination when it is received from a consumer listening on a Topic with a wild card. I have tested with both 1.0.3 and 1.0.5 clients with RabbitMQ 3.1.5.
    I was wondering if the community was aware of this problem and if there are any workarounds? If not what is the proper channel to file a bug report. An example code snippet is below. The test fails because the TextMessageMatcher expects the destination passed in on construction (second parameter) to equal the desination on the message received (aquired from getJMSDestination).
            Mockery context = new Mockery();
            final MessageListener messageListener = context.mock(MessageListener.class);
            final Latch latch = new LatchImpl();
            final String prefix = "test" + System.currentTimeMillis();
            context.checking(new Expectations() {
                    oneOf(messageListener).onMessage(with(new TextMessageMatcher("MSG1", prefix + ".1234")));
                    will(new CustomAction("release latch") {
                        @Override
                        public Object invoke(Invocation invocation) throws Throwable {
                            latch.unlatch();
                            return null;
            final Connection connection = createConnection(null, null);
            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            connection.start();
            Topic wildcardTopic = (Topic) getInitialContext().lookup(prefix + "." + "#");
            Topic destination = (Topic) getInitialContext().lookup(prefix + ".1234");
            final MessageConsumer consumer = session.createConsumer(wildcardTopic);
            consumer.setMessageListener(messageListener);
            MessageProducer producer = session.createProducer(null);
            producer.send(destination, session.createTextMessage("MSG1"));
            latch.await(5000);
            connection.close();
            Thread.sleep(5);
            context.assertIsSatisfied();

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

  • JMS adapter could not receive message from Tibco EMS topic

    I'm trying to consume message from tibco EMS topic using Oracle SOA JMS adapter. Can anyone please let me know the steps to do this. Appreciate your help.
    Thanks,
    SB

    Increase Log level for cube.activation to debug and check the logs by stopping & starting the activation agent(I mean Retire and activate the process) .. It should give a clue on what's happening..

  • JMS Messages keep on growing for a Topic with non-durable consumers

    I have a JMS Server whose "Messages Current" keeps on growing after every message send to the topic. All the consumers are non-durable. The session is a non-transacted session with Auto Accknowledge parameter. My client does recieve the message, but it does not go down from the "Messages Current" in the WLS console. Also once the server is restarted, the messages go down to 0.
    I am using 9.2 SP2 on a Solaris environment.
    Any insight would be helpful

    It's possible that one or more the subscribers is stalled for some reason and so is not actually receiving and processing messages. This would cause messages to accumulate. You can examine statistics for individual consumers on the console to see if this is an issue.
    Also, there could be a durable subscription on the topic left over from some previous application you used with the topic. There are statistics for these as well.
    Yet another possibility is that the clients are receiving the messages but are failing to acknowledge/commit them. You wrote that the sessions are "auto-acknowledge" but they could accidentally be "transacted". Check to make sure that the first parameter passed to "createSession" is true (it should be false), and that the second parameter is set to auto-acknowledge.
    Finally, if you happen to be using a distributed topic, keep in mind that if one of the topic members is unavailable/crashed/down messages will accumulate on the other distributed topic members until the unavailable member is restarted (at which point they will be forwarded to the restarted member).
    Tom

  • Weird things when persisting the jms messages of topic in the wls9?

    I am testing the store of the jms messages in wls9.
              But when i sent a topic message to the topic, it seems that the message cannot be stored to the persistent stores.
              The things were that:
              when i send a message of queue and refreshed the page of console of wls9.I saw the number changed in :"Home > Summary of Persistent Stores > exampleJDBCStore "-Monitoring-Statistics,the "Create Count" had increased.
              But when i use the topic message, the "Create Count" never changed.
              Anybody can tell me why?
              Is the topic message cannot be stored in persistent stores, or others ?
              thx and rgds.

    Topic messages are not persisted unless both the publisher qos is persistent and there are existing durable subscribers. Otherwise, there is no need to persist them. Do you have any durable subscribers?
              Tom

  • Need suggestion on  implementing JMS message error recovery

    Hi,
    Our application has a JMS topic where we publish application events. Now, there can be scenarios where the consumers cannot process the message due to some infrastructure issues and would error out. We need a way so that those messages can be reprocessed again later. we are thinking of the following design for JMS message error recovery
    1. Use a persistent TOPIC (this would ensure guaranteed delivery)
    2. Configure a error destination on JMS topic e.g a jms queue
    3. Have an error handling MDB listening to the Error destination. An error handling MDB would dequeue the errored messages from error destination and persist it to a Data base "error" table..
    4. Provide a mechanism to republish those messages to topic (e.g a scheduler or admin ui or a command line utility) .. The messages would deleted from database "error" table and published to topic again....
    A. Are there any issues with the above design which we need to handle?
    B. Are there any additional steps required in a Cluster environment with a distributed topic and distribute error destination? (our error mdb will have one-copy-per-application setting)
    B. From a performance angle, Is it OK to use persistent TOPIC ? Or will it better to persist the message to the db table and then publish it as a non persistent message ... ? (But i guess the performance should be more or less the same in both of these approaches)
    C. Are there any other recommended design patterns for error recovery of JMS messages
    Please advise.
    Regards,
    Arif

    Thanks Tom !
    We may not be able to go with the approach of delaying/pausing redelivery of the messsage because
    1. Pausing entire MDB approach: Our MDB application consumes messages generated by different producers and our MDB needs to continue processing the messages even if messages corresponding to one producer is erroring out
    2. Redelivery delay : This would only delay the retry of an errored message. But there would still be a problem if the message fails during all retries (i.e redelivery limit count). We don't want to lose this message. In our case, It is possible that a particular message cannot be processed due to unavailability of a third party system for hours or may be a day.
    Basically, i am looking on approaches for a robust and performant error recovery/retry framework for our application (refer details in my first post on this thread) while fully making use of all features provided by middleware (WLS). Please advise.
    Regards,
    Arif

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

  • Undelivered JMS messages get deleted on startup. Why?

              WebLogic 6.1 (SP2), NT4 (SP6), native IO enabled.
              Here's what happens:
              1. A JMS client posts a number of messages (say 8000) to a Weblogic JMS queue backed
              up by a database store.
              2. The JMS consumer (i.e. Message driven bean's onMessage()) is slow - it has 5 seconds
              of processing to do for each message.
              3.The JMS monitoring screens show 100 messages have been processed - this is ok;
              the client can post much faster than the server can consume. This would imply 7900
              messages undelivered.
              4. We do a controlled shutdown of the server.
              5. A select count(*) from JMS_JMSStore reveals all 8000 messages have been persisted.
              6. We start up the server. The JMS recovery message in weblogic.log indicates that
              a scan of 8000 records has been made.
              7. I would now expect 7900 undelivered messages to be passed to the mdb's onMessage()
              method (remember before shutdown, 100 messages were processed by onMessage()).
              8. This doesn't happen; onMessage() gets nothing, and a select count(*) from JMS_JMSStore
              reveals zero records! Why have these messages been deleted?
              Presumably on startup, the JMS recovery tries to ensure that the JMS store only holds
              messages that have yet to be delivered. But in this case it's deleteing everything.
              Note that there are no error messages or stack traces to report.
              Any ideas, anyone?
              simon.
              

    It has to be durable, or there wouldn't be anything in the store.
              What happens if you undeploy and redeploy the MDB (instead of shutting
              down)? Do your messages have a time-to-live? Your configuration has not
              changed? Try it without the MDB. That is just a program that creates
              durable subscriber. Have it receive 100
              messages. Shutdown the server and restart, then restart the durable
              subscriber program. This would prove it is JMS or if the MDB container is
              doing something ugly like an unsubscribe.
              _sjz.
              "DanS" <[email protected]> wrote in message
              news:[email protected]...
              > Simon,
              >
              > The JMS consumer, is it created as a durable subscriber? As far as I knoe,
              > weblogic will keep the messages in the queue / topic only if the consumer
              is
              > registered as a durable subscriber.
              >
              > Dan
              >
              > "Simon Spruzen" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > WebLogic 6.1 (SP2), NT4 (SP6), native IO enabled.
              > >
              > > Here's what happens:
              > >
              > > 1. A JMS client posts a number of messages (say 8000) to a Weblogic JMS
              > queue backed
              > > up by a database store.
              > >
              > > 2. The JMS consumer (i.e. Message driven bean's onMessage()) is slow -
              it
              > has 5 seconds
              > > of processing to do for each message.
              > >
              > > 3.The JMS monitoring screens show 100 messages have been processed -
              this
              > is ok;
              > > the client can post much faster than the server can consume. This would
              > imply 7900
              > > messages undelivered.
              > >
              > > 4. We do a controlled shutdown of the server.
              > >
              > > 5. A select count(*) from JMS_JMSStore reveals all 8000 messages have
              been
              > persisted.
              > >
              > > 6. We start up the server. The JMS recovery message in weblogic.log
              > indicates that
              > > a scan of 8000 records has been made.
              > >
              > > 7. I would now expect 7900 undelivered messages to be passed to the
              mdb's
              > onMessage()
              > > method (remember before shutdown, 100 messages were processed by
              > onMessage()).
              > >
              > > 8. This doesn't happen; onMessage() gets nothing, and a select count(*)
              > from JMS_JMSStore
              > > reveals zero records! Why have these messages been deleted?
              > >
              > > Presumably on startup, the JMS recovery tries to ensure that the JMS
              store
              > only holds
              > > messages that have yet to be delivered. But in this case it's deleteing
              > everything.
              > >
              > > Note that there are no error messages or stack traces to report.
              > >
              > > Any ideas, anyone?
              > >
              > > simon.
              > >
              >
              >
              

  • Can not dequeue JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE using DBMS_AQ

    I'm having a problem using DBMS_AQ package to dequeue a JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE that was put on the queue using Java JMS API.
    Both JMS header and payload return empty but if I do "select user_data" from the queue table, I can see the message.
    Appreciate any helps or tips.
    Kim

    This has been asked a lot of times - I'm not sure how my initial searching missed all of the other questions/answers related to this topic.
    In our case, the solution was to:
    1) Leave the queue as a sys.aq$_jms_text_message type
    2) Construct a sys.xmltype object with our desired payload
    3) Do a getStringVal() on the xmltype object and use that string as the payload for our queue message
    - Nathan

  • Messages in a Queue/Topic

    hi
    How do i check if there are any messages in the Queue/topic. i am using Platform edition
    Thanks

    Download an install software for browsing queues.
    Not quite sure what "Platform" edition is. If your JMS provider is MQ, use MQ Explorer / rfhutil, otherwise I find Hermes very useful

  • Trouble using JMS Message Selector and DCJMSMessageProperty0

    Hello Experts!
    My scenario is Mainframe => MQ => JMS Adapter => XI => SAP
    My MQ channel is communicating fine to XI and I've set the JMS adapter to JMS Compliant.
    I have multiple message types with consistent headers but varying data layouts that I need to route to different mapping objects. So it seems the best solution for this is JMS Message Selector based on reading a header value from one of the dynamic message properties.
    I've read SAP Notes and SAP Library and SDN Wiki articles about this configuration and I think its possible.
    http://help.sap.com/saphelp_nw04s/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/frameset.htm
    Note 856346 - J2EE JMS Adapter: Frequently Asked Questions (FAQ)
    Note 1086303 - XI JMS Adapter and IBM Websphere MQ: FAQ
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/usage%252bof%252bmessage%252bselector%252bfor%252bjms%252bsender%252badapter
    My mainframe sends an MQ message that includes some extra header information like
    field: ApplType  VALUE: 000000002                                              
    field: ApplName    VALUE: MIS056O          
    I configured my Communication Channel to set Adapter-Specific Message Attributes and also Additional JMS Message Properties to include ApplType and ApplName.
    However, I can only see some of the standard JMS header items such as CorrelationID, none of the additional ones.
    In RWB I see "JMS property 'ApplType' that corresponds to dynamic header 'DCJMSMessageProperty0' is missing from JMS message 'ID:f2f0f0f9f0f4f2f1f0f9f1f5f5f3f7f44040404040404040'; consequently it cannot be added to XI message 'e136a6e8-8580-4adc-2007-9ccab93f1ef4' as a dynamic header"
    Can anyone with some experience doing this help me see if I'm missing a trick somewhere? How can I see where this information is being dropped? Could it be when MQ is handing to JMS?
    Many thanks,
    Aaron

    After sifting through some IBM documentation I found that the PutApplName field actually maps to JMS name JMSXAppID. So after adding this to my Additional JMS Message Properties list I get the dynamic JMS message property I need for sorting out the messages.
    http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaw.doc/uj25450_.htm

  • JMS messaging not working with LCDS and Fiorano

    Hi there,
    Been struggling at this all day with no luck. I have a finished Flex application which uses JMS messaging, and it has worked just fine on my Tomcat server while using ActiveMQ. As soon as I switched to using the JMS provider Fiorano however, my application can no longer use JMS resources. It fails whenever the application tries to subscribe or publish to a JMS topic. I made all the appropriate JMS related changes to messaging-config.xml.
    In the tomcat log, I turned on LCDS debugging and saw this error whenever a publisher or subscriber was trying to start:
    "JMS invocation caught exception: SECURITY_EXCEPTION :: Security exception occurred while trying to perform operation :: CreateSubscriber failed,creation of Non-durable Subscriber NOT allowed."
    I am passing my JMS security credentials via messaging-config.xml AND even tried doing it via the Flex application (setRemoteCredentials(..)). I know they are correct because I have a working Java application with the exact same credentials and other JMS settings working just fine. It seems only the Flex application fails using the same JMS credentials/settings.
    Is there some other file that needs modification other than messaging-config.xml to get a new JMS provider to work? Any idea what may be going on?
    Thanks!

    A large number of messages, or messages large in size, basically total size of all messages can hang things up.  Back up your messages with a GPStore app.  Erase them.  Lower your message character size.  IF it still continues, its the recipients phone.  Both of you should power down, remove SIM, reinsert, power up.

  • JMS Message Queue - stuck in

    I am on SOA SUITE 11.1.17
    I have a jms queue set up and am able to successfully send messages to it using the SOA JMS Adapter.  I am able to succesfully listen to a queue using a JMS adapter in a different project.
    However, here when I try to "listen" to the queue using a java program, the message is "received" in my java program and processed as it should be.  The java program is running in a while loop, so it stays running.
    On the queue, when the java program reads it, the message is moved to the "Messages Pending" column.  When I kill the java program, the message is returned to the "Messages Current"
    Would anyone have any ideas about this?  We have an existing java based program isn't properly "closing" the message.
    I tried:
    1.  placing msg.acknowledge() in the code, since the documentation states that messages that are in "Messages Pending" have been read, but not acknowledged or committed -- but this does nothing.
    2.  Setting the expiration on the message to 1, but that is a hack.  I would rather fix the problem than use a hack.
    Anyone have any ideas what is wrong?
    Thank you,
    Stuart
    import java.io.IOException;
    import java.io.InputStreamReader;
    import javax.jms.Connection;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageListener;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    public class JMSListenAndRespond extends JMSQueueHandler implements MessageListener {
      private Session jmsSession = null;
      private MessageConsumer jmsMessageConsumer = null;
      private Connection jmsConnection = null;
      int counter = 1 ;
      public static void main(String[] args) throws Exception {
        InputStreamReader commandBuffer = null;
        char command = '\0';
          // first listen for any messages
          JmsDataObject q = new JmsDataObject();
          q.setJmsCF("jms/TestConnectionFactory");
          q.setJmsQueue("jms/TestJMSQueue");
          q.setServerPwd("welcome1");
          q.setServerLogin("weblogic");
          q.setUrl("t3://localhost:7101");
          q.setJmsMsg("na -- we are listinging...");
        JMSListenAndRespond lis = new JMSListenAndRespond();
         lis.consumeMessage(q);
        System.out.println("(type q to exit at any time...)\n");
        try {
          // Now just loop, waiting for messages until user types 'q' to quit
          commandBuffer = new InputStreamReader(System.in);
        while (!(command == 'q')) {
           try {
              command = (char)commandBuffer.read();
              System.out.println("Command: "+command);
              lis.stopListening();
            } catch (IOException e) {
              System.err.println("I/O Exception: ");
              e.printStackTrace();
           } //while
        } finally {
                lis.stopListening();
          lis.stopListening();
       public void stopListening() {
        try {
          if (jmsMessageConsumer != null) {
            jmsMessageConsumer.close();
          if (jmsSession != null) {
            jmsSession.close();
          if (jmsConnection != null) {
            jmsConnection.close();
        } catch (JMSException e) {
          System.err.println("Couldn't properly close all resources.\n");
          e.printStackTrace();
      private void prepareToConsumeMessage() {
        // create JMS connection, session, consumer and register listener - then start session
            try {
          // create connection
          jmsConnection = getJmsConnectionFactory().createConnection();
          // create session
          jmsSession =   jmsConnection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
          jmsMessageConsumer = jmsSession.createConsumer(getJmsDestination());
          // register a message listener (onMessage)
          jmsMessageConsumer.setMessageListener(this);
          // initiate connection - make sure to register your listener first or you might lose messages
          jmsConnection.start();
          System.out.println("\n...listening for message!\n");
        } catch (JMSException e) {
          System.err.println("Problem initializing JMS session");
          e.printStackTrace();
          System.exit(-1);
         * onMessage
         * The callback function invoked upon message reception
      public void onMessage(Message msg) {
        try {
          String msgText;
          if (msg instanceof TextMessage) {
            msgText = ((TextMessage)msg).getText();
            // this method expects a CSV string with the following makeup:
            // firstName,lastName,gender,birthdate,address,city,zipcode,state,insurancePolicyId
            String messageId = msg.getJMSMessageID();
          // code to process goes here.....
          } else {
            // if message is not a TextMessage, attempt a conversion to string
            System.out.println("\n** NEW MESSAGE (" + msg.getClass().getName() +
                               "):\n" +
                msg.toString());
        } catch (JMSException e) {
          e.printStackTrace();
      public void consumeMessage(JmsDataObject q ) {
        initializeJndiProperties(q);
        initializeJNDIandCF(q.getJmsQueue());
        prepareToConsumeMessage();
    import java.util.Properties;
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.Destination;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public abstract class JMSQueueHandler {
      protected void initializeJNDIandCF(String destinationQueueName) {
        // initialize JNDI context and lookup connection factory and destination
        try {
          // Initialize JNDI context
          jndiContext = new InitialContext(jndiProperties);
        } catch (NamingException e) {
          e.printStackTrace();
        try {
          // lookup JMS connection factory in JNDI
          jmsConnectionFactory =
              (ConnectionFactory)jndiContext.lookup(jndiProperties.getProperty("factory.name"));
          // lookup JMS destination in JNDI
          jmsDestination = (Destination)jndiContext.lookup(destinationQueueName);
        } catch (NamingException e) {
          System.err.println("Problem during the JNDI lookup\n");
          e.printStackTrace();
          System.exit(-1);
      public void initializeJndiProperties(JmsDataObject qdo ) {
        // set JNDI properties
        jndiProperties.put("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");
        jndiProperties.put("java.naming.provider.url", qdo.getUrl() );
       // jndiProperties.put("java.naming.security.principal", NAMING_PRINCIPAL);
        jndiProperties.put("java.naming.security.principal", qdo.getServerLogin() ) ;
        //  jndiProperties.put("java.naming.security.credentials", NAMING_CREDENTIAL);
        jndiProperties.put("java.naming.security.credentials", qdo.getServerPwd() );
        //jndiProperties.put("factory.name", JMS_CONNECTION_FACTORY);
        jndiProperties.put("factory.name", qdo.getJmsCF() );
      //protected static final String NAMING_PROVIDER_URL = "t3://localhost:7101";
    //protected static final String NAMING_PRINCIPAL = "weblogic";
    // protected static final String NAMING_CREDENTIAL = "welcome1";
    // protected static final String JMS_CONNECTION_FACTORY = "jms/patientsJmsCF";
    // protected static final String JMS_CONNECTION_FACTORY = "jms/TestConnectionFactory";
      ConnectionFactory jmsConnectionFactory = null;
      Destination jmsDestination = null;
      InitialContext jndiContext = null;
      Properties jndiProperties = new Properties();
      public void setJmsConnectionFactory(ConnectionFactory jmsConnectionFactory) {
        this.jmsConnectionFactory = jmsConnectionFactory;
      public ConnectionFactory getJmsConnectionFactory() {
        return jmsConnectionFactory;
      public void setJmsDestination(Destination jmsDestination) {
        this.jmsDestination = jmsDestination;
      public Destination getJmsDestination() {
        return jmsDestination;

    Thanks for the reply. There are no errors what so ever regarding MDB issues. Not in the weblogic / console logging, nor in the logging of the component itself.
    The MDB itself is setup to have 16 concurrent beans per component deployment. The component is clustered over 4 server instances. So there are quite some concurrent MDBs running. However since the messages get stuck for weeks eventhough the component only has bursts of messages to process, one would think that the the stuck messages would be processed whenever the component has some spare time (which it has a lot between the bursts).
    Therefor i doubt it has anything to do with too little MDBs running. But frankly I have no idea what's wrong.

  • How to send a JMS message to a remote Queue?

    Hi,
    I know how to create a JMS message and send it to an MDB that listens to a topic in the same container in which the JMS is created.
    In other words, if I have the following MDB:
    @MessageDriven(mappedName = "jms/MyQueue", ...)
    public class MyMDB implements MessageListener {
    Elsewhere in my JEE app I can create a Queue like this:
    @Resource(mappedName = "jms/MyQueue")
    Queue queue;
    and use it to send a message to the MDB.
    But How can I send a message to an MDB that's deployed in another app server on another machine in the network? Both of the app servers are Glassfish.
    Thanks in advance.
    Edited by: EJP on 9/08/2011 21:49: fixed your meaningless title

    Hi,
    The first thing I would like to suggest is, we never/can't send message directly to MDB. We always send/receive message(s) to/from the destination. In case of MDB, the application server register the MDB as message listener against particular destination, and invoked the onMessage() method when message arrives on particular destination.
    If I am not wrong, what you want to achieve is asynchronous communication between two applications deployed in two different machine. In your case, you want your one application works as message producer and other act as an message consumer, and both are deployed in different machine.
    In this situations, you only need to configure the JMS administration object, connection factories and destinations, on one Application server and configure other application server to use those configuration using JMS resource adapter. you can well achieve this by configuring the JMS Resource Adapter. you need to check the Glassfish documentation.
    If you don't want to break the JMS specification, always communicate with Messaging Provider through Resource Adapter.
    I hope this helps.

Maybe you are looking for