MDB listening on AQ.

I have written a message driven bean that listens on an Oracle AQ. In v9.0.2 of OC4J I had a number of problems (e.g. the MDB would wait 240 seconds before accepting a second message, and the queue working in a LIFO way instead of a FIFO way). However, the developers preview (v9.0.3) of OC4J has fixed these 2 problems but introduced another. Now my messages never get dequeued from my AQ (they did in v9.0.2). Has anyone else encountered a similar problem using a MDB on Oracle AQs and v9.0.3 of OC4J?
Thanks,
Stephen Weatherly

Thanks for the reply, my MDB is transacted. In OC4J v9.0.3 my messages simply do not get dequeued when my MDB finishes it's processing. My MDB code runs and does what is expected, however, any messages delivered to it from the queue are not being automatically dequeued. In OC4J v9.0.2 after my MDB's code had finished successfully then the message would be dequeued by whatever process manages the delivering the message to the MDB, however in OC4J v9.0.3 this does not seem to happen. After my MDB has run the message remains on the queue. If I then restart the OC4J server then I receive the message again even though my MDB sucessfully processed the message the first time.
My MDB code is as follows:
package mdb;
import javax.ejb.*;
import javax.jms.*;
import javax.naming.*;
import java.util.*;
public class MessageLogger implements MessageDrivenBean
private final static int sleepTotal = 10 ;
private MessageDrivenContext messageContext;
public void ejbCreate()
System.out.println("MessageLogger.ejbCreate()");
public void onMessage(Message message)
System.out.println("Received message: " + message + " at " + new java.util.Date());
try
     oracle.jms.AQjmsTextMessage oracleMessage = (oracle.jms.AQjmsTextMessage) message;     
     System.out.println("MessageLogger.onMessage() : " + oracleMessage.getText() );
//System.out.println("MessageLogger.onMessage() : " + message.getStringProperty("subject") + " " + message.getStringProperty("message"));
System.out.println("Sleeping...");
int sleepCount =0;
while (sleepCount < sleepTotal)
System.out.println("Sleeping: " + (1+(sleepCount++)) + " / " + sleepTotal );
try
Thread.sleep(1000);
catch (Exception e)
catch(Exception e)
throw new EJBException(e);
public void ejbRemove()
System.out.println("MessageLogger.ejbRemove()");
public void setMessageDrivenContext(MessageDrivenContext context)
this.messageContext = context;
My ejb-jar.xml looks like:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
     <description>A How-To demonstrating Message-Driven Beans</description>
     <enterprise-beans>
          <message-driven>
               <description></description>
               <ejb-name>MessageLogger</ejb-name>
               <ejb-class>mdb.MessageLogger</ejb-class>
               <message-driven-destination>
                    <destination-type>javax.jms.Queue</destination-type>
               </message-driven-destination>
          </message-driven>
     </enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MessageLogger</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
My orion-ejb-jar.xml looks as follows:
<?xml version="1.0"?>
<!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
<orion-ejb-jar>
     <enterprise-beans>
          <message-driven-deployment name="MessageLogger"
destination-location="java:comp/resource/RUB4/Queues/AQ.JMS_queue_1"
connection-factory-location="java:comp/resource/RUB4/QueueConnectionFactories/JMS_Queue_CF"
max-instances="1">
          </message-driven-deployment>
     </enterprise-beans>
     <assembly-descriptor>
     </assembly-descriptor>
</orion-ejb-jar>
And I have the following resource provider set up in my OC4J applications.xml file:
<resource-provider class="oracle.jms.OjmsContext" name="RUB4">
<description>Access to RUB4 database rubick</description>
<property name="url" value="jdbc:oracle:thin:aq/aq@rubick:1521:RUB4" />
<property name="username" value="aq" />
<property name="password" value="aq" />
</resource-provider>
Thanks for any assistence,
Steve

Similar Messages

  • MDB listening to a Oracle AQ, holding ADT messages...

    Hi !
    I'm trying to set a MDB to listen for incoming messages on an Oracle AQ. When I created the queue, I specified that the queue should contain payload of type ADT. I'm using Bea Weblogic server 8.1 sp4 and Oracle 10.2.0. The creation of the connection to the queue is implemented as a start up class and bound to the context during server start up.
    However it fails to start up, I get the following exception:
    <20.mar.2007 kl 11.03 CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
    MyWebLogicMDB is unable to connect to the JMS destination: AQJMSQueue. The Erro
    r was:
    oracle.jms.AQjmsException: JMS-137: Innholdsfabrikk mÕ angis for mÕl med ADT-inn
    hold
    oracle.jms.AQjmsException: JMS-137: Innholdsfabrikk mÕ angis for mÕl med ADT-inn
    hold
    at oracle.jms.AQjmsError.throwEx(I)V(AQjmsError.java:288)
    at oracle.jms.AQjmsConsumer.<init>(Loracle.jms.AQjmsSession;Ljavax.jms.D
    estination;IILjava.lang.String;Ljava.lang.Object;Loracle.jms.AQjmsSelector;Ljava
    .lang.String;Z)V(AQjmsConsumer.java:385)
    at oracle.jms.AQjmsConsumer.<init>(Loracle.jms.AQjmsSession;Ljavax.jms.D
    estination;IILjava.lang.String;Ljava.lang.Object;Loracle.jms.AQjmsSelector;Ljava
    .lang.String;)V(AQjmsConsumer.java:254)
    at oracle.jms.AQjmsSession.createReceiver(Ljavax.jms.Queue;Ljava.lang.St
    ring;Ljava.lang.Object;)Ljavax.jms.QueueReceiver;(AQjmsSession.java:1631)
    at oracle.jms.AQjmsSession.createReceiver(Ljavax.jms.Queue;Ljava.lang.St
    ring;)Ljavax.jms.QueueReceiver;(AQjmsSession.java:1553)
    at weblogic.ejb20.internal.JMSConnectionPoller.setUpQueueSessions(Ljavax
    .jms.Destination;Ljava.lang.String;III)V(JMSConnectionPoller.java:1720)
    at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection()V(JM
    SConnectionPoller.java:2019)
    at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS()V(JMSConnec
    tionPoller.java:1180)
    at weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling
    ()V(JMSConnectionPoller.java:846)
    at weblogic.ejb20.deployer.MessageDrivenBeanPoolInfoImpl.start()V(Messag
    eDrivenBeanPoolInfoImpl.java:234)
    at weblogic.ejb20.deployer.EJBDeployer.deployMessageDrivenBeans()V(EJBDe
    ployer.java:1660)
    at weblogic.ejb20.deployer.EJBDeployer.start(Z)V(EJBDeployer.java:1488)
    at weblogic.ejb20.deployer.EJBModule.start()V(EJBModule.java:689)
    at weblogic.j2ee.J2EEApplicationContainer.start([Lweblogic.j2ee.J2EEAppl
    icationContainer$Component;)V(J2EEApplicationContainer.java:2127)
    at weblogic.j2ee.J2EEApplicationContainer.activate([Lweblogic.management
    .configuration.ComponentMBean;)V(J2EEApplicationContainer.java:2168)
    at weblogic.j2ee.J2EEApplicationContainer.activate()V(J2EEApplicationCon
    tainer.java:2115)
    at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivat
    ion(Z)V(SlaveDeployer.java:3082)
    at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForA
    llApplications(ZZ)V(SlaveDeployer.java:1751)
    at weblogic.management.deploy.slave.SlaveDeployer.resume()V(SlaveDeploye
    r.java:359)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resum
    e()V(DeploymentManagerServerLifeCycleImpl.java:229)
    at weblogic.t3.srvr.SubsystemManager.resume()V(SubsystemManager.java:131
    at weblogic.t3.srvr.T3Srvr.resume()V(T3Srvr.java:966)
    at weblogic.t3.srvr.T3Srvr.run([Ljava.lang.String;)I(T3Srvr.java:361)
    at weblogic.Server.main([Ljava.lang.String;)V(Server.java:32)
    >
    The problem is that the MDB cannot be set up to dequeue the message because the payload factory has to be set for the consumer in order to receive messages from queues which have messages with ADT payload.
    So my questions are:
    1) Is there a way to set the payload factory to use in the MDB? (deployment desc.)
    2) Do MDB support AdtMessages?
    3) Are there any other ways to listen to an Oracle queue which has ADT type?
    mvh
    jb

    Hi,
    I'm also having the same identical problem with an EJB 3.0 MDB listening to an AQ queue (via OJMS) with a payload type of ADT. I can successfully dequeue messages from a queue with a JMS payload type, but as soon as I point it to and ADT type queue I get:
    oracle.jms.AQjmsException: JMS-137: Payload factory must be specified for destinations with ADT payloads
    I can't however seem to find anything in the Oracle documentation that shows how to do this, and which class corresponds to this "payload factory".
    The following link seems to suggest that OJMS supports ADT types in addition to the standard JMS message types:
    http://www.oracle.com/technology/tech/java/oc4j/904/collateral/OC4J-FAQ-JMS-904.html
    although I'm not sure if this is true for Message Driven Beans.
    Could you please confirm whether MDB's support ADT message types?
    Many thanks
    Phil

  • MDB listening on Socket instead of Queue

    Hi all,
    Is it possible for to make MDB listen on socket instead of queues using JCA. Can anyone please help me on this.
    Thanks in advance

    Hi,
    Thanks for the reply. In the example provided, it is for mail. Since we have javax.mail.Message message API we can use this. How about Socket.Here am lost. Can you please tell how to go with this.
    I also had tried the above one, but while deploying MDB, I error as MDB is in failed state with Exception as Resource Adaptor "EchoXMLRP" is not deployed. Where as i had already deployed it. Also i had deployed "EchoXMLRP" as Resource Adaptor Module. But when i view the same its not present in standalone Resource Adaptor, instead its there in Modules.

  • MDB Listening to remote queue

              Hi,
              Could any of you please let me know what needs to be done to configure my MDB
              to listen to a remote queue in a different domain (also using wls 7.0).
              I tried adding the <provider-url> element in the weblogic-ejb-jar.xml but looks
              like that didnt work.
              Thanks,
              -Sri
              

    Posting the actual error helps. This error usually occurs due
              to a naming conflict. Make sure that:
              All local and remote:
              WL servers are named differently
              WL JMS servers are named differently
              WL JMS stores are named differently
              Tom, BEA
              P.S. For future reference, a google search of
              this newsgroup often quickly leads to answers. In this
              case search for "Connection not found" or "invocableFind".
              Sri wrote:
              > Tom, I did. But I still get this error...
              >
              > [exec] <Jun 10, 2003 9:27:57 AM EDT> <Error> <EJB> <010020> <EJB-20 - Messa
              > geDriven - Couldn't start the JMS connection: weblogic.jms.common.JMSException:
              > Connection not found
              > [exec] weblogic.jms.common.JMSException: Connection not found
              > [exec] at weblogic.jms.dispatcher.InvocableManager.invocableFind(Invoca
              > bleManager.java:134)
              > [exec] at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Req
              > uest.java:592)
              > [exec] at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(Dispatche
              > rImpl.java:275)
              > [exec] at weblogic.jms.client.JMSConnection.start(JMSConnection.java:54
              > 7)
              > [exec] at weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectio
              > n(JMSConnectionPoller.java:1228)
              > [exec] at weblogic.ejb20.deployer.MessageDrivenBeanPoolInfoImpl.startCo
              > nnection(MessageDrivenBeanPoolInfoImpl.java:150)
              > [exec] at weblogic.ejb20.deployer.MessageDrivenBeanPoolInfoImpl.start(M
              > essageDrivenBeanPoolInfoImpl.java:223)
              > [exec] at weblogic.ejb20.deployer.EJBDeployer.deployMessageDrivenBeans(
              > EJBDeployer.java:1560)
              > [exec] at weblogic.ejb20.deployer.EJBDeployer.start(EJBDeployer.java:14
              > 06)
              > [exec] at weblogic.ejb20.deployer.EJBModule.start(EJBModule.java:391)
              > [exec] at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationC
              > ontainer.java:1039)
              > [exec] at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicati
              > onContainer.java:1025)
              > [exec] at weblogic.management.deploy.slave.SlaveDeployer.setActivationS
              > tateForAllApplications(SlaveDeployer.java:617)
              > [exec] at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDe
              > ployer.java:376)
              > [exec] at weblogic.management.deploy.DeploymentManagerServerLifeCycleIm
              > pl.resume(DeploymentManagerServerLifeCycleImpl.java:235)
              > [exec] at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleLi
              > st.java:65)
              > [exec] at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:832)
              > [exec] at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300)
              > [exec] at weblogic.Server.main(Server.java:32)
              > [exec] >
              >
              > Tom Barnes <[email protected]> wrote:
              >
              >>Check your server logs for Warning and/or error messages.
              >>
              >>Make sure that you specified a correct:
              >>
              >>provider-url
              >>
              >>destination-jndi-name
              >>
              >>connection-factory-jndi-name (needed if you disabled the default
              >>connection factories in the remote domain)
              >>
              >>Sri wrote:
              >>
              >>>Hi,
              >>>
              >>>Could any of you please let me know what needs to be done to configure
              >>
              >>my MDB
              >>
              >>>to listen to a remote queue in a different domain (also using wls 7.0).
              >>
              >>>I tried adding the <provider-url> element in the weblogic-ejb-jar.xml
              >>
              >>but looks
              >>
              >>>like that didnt work.
              >>>
              >>>Thanks,
              >>>-Sri
              >>
              >
              

  • Help needed on MDB listening on an AQ

    We have a MDB which is listening on an AQ in a database. Here is the issue, we need to restart the container (MDB) everyday otherwise after a while, the MDB would not get the message that has been sent to AQ. We thought there is JDBC connection timeout issue, however, we don't know how to setup datasource so that it would not timout. Or may it be connection timeout issue on database side?
    Please help.

    message from q1and q2 needs to be correlated. if MsgID is  the key for correlation then create correlation element in the correlation editor. u will have two recv steps in bpm with correlation condition activated. so when a message q1 comes to bpm it will be in wait step until relevant message is arrived from q2. when the correlation condition is satisfied the processing happens. having split mapping u can process the messages and send as idocs to r3. this way is async.
    to make it sync (to get the respone from the r3) have one recv step after the send step that would expect a message from r3 on the status. following a send step that sends the response to jms.Thsi requires activating client proxy in r3 that would send the status of the idoc to xi once posted.
    or check this link for appl response handleing
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe
    Edited by: Prabhu  S on Jan 8, 2008 4:16 PM

  • Two MDB Listen on same topic

    Dear All,
    If I configure two separate MDBs to listen on the same Topic using Oracle JMS (i.e have a multi-consumer queue table,...), will each MDB receive the same message or will only the first MDB to have its onMessage method fired by the container get the message?
    Stuart

    If you use different subscriber names for the 2 MDBs, then both of them will each receive a separate copy of each message sent to that topic (this follows standard JMS topic semantics)

  • MDB listening to an Oracle AQ, holding ADT messages...

    Hi !
              I'm trying to set a MDB to listen for incoming messages on an Oracle AQ. When I created the queue, I specified that the queue should contain payload of type ADT. I'm using Bea Weblogic server 8.1sp4 and Oracle 10.2.0. The creation of the connection to the queue is implemented as a start up class and bound to the context during server start up.
              However it fails to start up, I get the following exception:
              <20.mar.2007 kl 11.03 CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
              MyWebLogicMDB is unable to connect to the JMS destination: AQJMSQueue. The Erro
              r was:
              oracle.jms.AQjmsException: JMS-137: Innholdsfabrikk m? angis for m?l med ADT-inn
              hold
              oracle.jms.AQjmsException: JMS-137: Innholdsfabrikk m? angis for m?l med ADT-inn
              hold
              at oracle.jms.AQjmsError.throwEx(I)V(AQjmsError.java:288)
              at oracle.jms.AQjmsConsumer.<init>(Loracle.jms.AQjmsSession;Ljavax.jms.D
              estination;IILjava.lang.String;Ljava.lang.Object;Loracle.jms.AQjmsSelector;Ljava
              .lang.String;Z)V(AQjmsConsumer.java:385)
              at oracle.jms.AQjmsConsumer.<init>(Loracle.jms.AQjmsSession;Ljavax.jms.D
              estination;IILjava.lang.String;Ljava.lang.Object;Loracle.jms.AQjmsSelector;Ljava
              .lang.String;)V(AQjmsConsumer.java:254)
              at oracle.jms.AQjmsSession.createReceiver(Ljavax.jms.Queue;Ljava.lang.St
              ring;Ljava.lang.Object;)Ljavax.jms.QueueReceiver;(AQjmsSession.java:1631)
              at oracle.jms.AQjmsSession.createReceiver(Ljavax.jms.Queue;Ljava.lang.St
              ring;)Ljavax.jms.QueueReceiver;(AQjmsSession.java:1553)
              at weblogic.ejb20.internal.JMSConnectionPoller.setUpQueueSessions(Ljavax
              .jms.Destination;Ljava.lang.String;III)V(JMSConnectionPoller.java:1720)
              at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection()V(JM
              SConnectionPoller.java:2019)
              at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS()V(JMSConnec
              tionPoller.java:1180)
              at weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling
              ()V(JMSConnectionPoller.java:846)
              at weblogic.ejb20.deployer.MessageDrivenBeanPoolInfoImpl.start()V(Messag
              eDrivenBeanPoolInfoImpl.java:234)
              at weblogic.ejb20.deployer.EJBDeployer.deployMessageDrivenBeans()V(EJBDe
              ployer.java:1660)
              at weblogic.ejb20.deployer.EJBDeployer.start(Z)V(EJBDeployer.java:1488)
              at weblogic.ejb20.deployer.EJBModule.start()V(EJBModule.java:689)
              at weblogic.j2ee.J2EEApplicationContainer.start([Lweblogic.j2ee.J2EEAppl
              icationContainer$Component;)V(J2EEApplicationContainer.java:2127)
              at weblogic.j2ee.J2EEApplicationContainer.activate([Lweblogic.management
              .configuration.ComponentMBean;)V(J2EEApplicationContainer.java:2168)
              at weblogic.j2ee.J2EEApplicationContainer.activate()V(J2EEApplicationCon
              tainer.java:2115)
              at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivat
              ion(Z)V(SlaveDeployer.java:3082)
              at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForA
              llApplications(ZZ)V(SlaveDeployer.java:1751)
              at weblogic.management.deploy.slave.SlaveDeployer.resume()V(SlaveDeploye
              r.java:359)
              at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resum
              e()V(DeploymentManagerServerLifeCycleImpl.java:229)
              at weblogic.t3.srvr.SubsystemManager.resume()V(SubsystemManager.java:131
              at weblogic.t3.srvr.T3Srvr.resume()V(T3Srvr.java:966)
              at weblogic.t3.srvr.T3Srvr.run([Ljava.lang.String;)I(T3Srvr.java:361)
              at weblogic.Server.main([Ljava.lang.String;)V(Server.java:32)
              >
              The problem is that the MDB cannot be set up to dequeue the message because the payload factory has to be set for the consumer in order to receive messages from queues which have messages with ADT payload. (Text works OK)
              So my questions are:
              1) Is there a way to set the payload factory to use in the MDB? (deployment descriptor)
              2) Do MDB support AdtMessages?
              3) Are there any other ways to listen to an Oracle queue which has ADT type?
              mvh
              jb

    I don't think there's a way to have MDBs call arbitrary proprietary JMS extensions.
              You might want to check if Oracle supplies some sort of configuration method - perhaps via destination or connection factory configuration, by passing extra information in the CF or destination JNDI name, by specifying a -D on the JVM command line, or by passing special properties through to their InitialContext.
              Another option is to code your own JMS wrapper classes around AQ that call the required extensions as needed.
              Tom

  • Can an MDB listens to remote queue

    In my application , i have created a queue and MDB for that queue.
    this MDB should also listen to the queue in another system that is remote queue.how is this possible.
    because the queue will be in remote system. and MDB will be in my system. the queue to which this MDB should listen will be in specified in deplyment descriptors. then how it will identify that the queue is local or remote.
    Please clarify me as we have a release near.

    Hello Sairam,
    I have used MDB in WebLogic Server. You can add the Destination Queue, Connection factory, etc information in weblogic-ejb-jar.xml.
    I am not sure what is to be used in Oracle Server.
    Simple search in Oracle Website gave me some links..
    http://www.oracle.com/technology/tech/java/oc4j/ejb3/how_to/howtoejb30mdb/doc/how-to-ejb30-mdb.html
    Search the Oracle website for more information.
    Thanks and regards,
    Pazhanikanthan. P

  • MDB listening to multiple queues?

              Is it possible to configure an MDB to listen to more than one Queue ?
              

    No.
              _sjz.
              "Jim" <[email protected]> wrote in message news:3d496d70$[email protected]..
              >
              > Is it possible to configure an MDB to listen to more than one Queue ?
              

  • Making MDB listen to a queue

    Hi all,
    Can any one tell me how to make an MDBean listen to a Queue Using JDev wizard.
    Kindly help....

    mshreedhaaran wrote:
    Hi,
    Thanks to the below post(s) -
    <a class="jive-link-external" href="http://ibswings.blogspot.com/2008/02/integrating-mq-broker-6-with-bea.html">http://ibswings.blogspot.com/2008/02/integrating-mq-broker-6-with-bea.html</a>
    <a class="jive-link-external" href="http://www-128.ibm.com/developerworks/websphere/library/techarticles/0604_kesavan/0604_kesavan.html">http://www-128.ibm.com/developerworks/websphere/library/techarticles/0604_kesavan/0604_kesavan.html</a>
    I have been able to get this far (ofcourse explained very well step by step in these posts). So MDB on WLS can pick messages from a Queue on MQ Server on the same machine.
    If someone can highlight what <font face="tahoma,verdana,sans-serif" size="1" color="#000">changes</font> I have to make to get the MDB to pick message from the Queue when MQ Server is on a different machine.
    Thanks in advance.
    best regards,
    MuraliIt's helpful to me, Thanks for your sharing! Now I understand more about it, It's quite useful.

  • MDBs listen on remote queue

    How do you configure MDBs to listen on a remote queue in OAS 10g 10.1.3?
    I've tried using the SonicMQ example in the container services guide as a template, but I haven't been able to get it to work.
    Thanks.
    Dan

    Ok I understand now. When you said remote I thought you meant a destination outside the service bus, and not an MQ remote queue. Unfortunately I have little advice to give. The documentation states:
    When you create an MQ service, select the transport protocol as mq and specify the Endpoint URI in the Transport Configuration >page. Specify the Endpoint URI in mq://local-queue-name?conn=mq-connection-resource-ref format where
    local-queue-name is the name of the local queue configured on the MQ server
    mq-connection-resource-ref points to the location of the MQ connection resource I don't know if it's possible to use a remote queue directly, my knowledge of MQ is limited. Hopefully someone else can help. Or you could contact support and ask if remote queues are supported.

  • Probelems with MDB listening to MQ (Startup class issue )

    Hello ,
              I am supposed to write a Message driven bean that would reside on
              Weblogic7.0 and listen to a particular queue of IBM MQ.
              I understand that we need to write a Start-up class for this. I have
              written the start-up class but I am getting the following error:
              <Apr 16, 2003 3:17:14 PM EDT> <Warning> <EJB> <010061> <The
              Message-Driven EJB: SimpleMDB is unable
              to connect to the JMS destination: ivtQ. The EJB container will
              automatically attempt to re-establis
              h the connection with the JMS server. This warning may occur during
              WebLogic Cluster start-up if the
              JMS destination is located on another server. When the JMS server
              connection is re-established, the
              Message-Driven EJB will again receive JMS messages.
              The Error was:
              The JMS destination with the JNDI name: ivtQ could not be found.
              Please ensure that the JNDI name in
              the weblogic-ejb-jar.xml is correct, and the JMS destination has been
              deployed.>
              I understand that there are some configuration issues:
              Can you please guide where am I going wrong:
              1.     What should be the value of the <destination-jndi-name> in the
              Weblogic-ejb-jar. I have not passed any Queue name through the
              start-up class &#8230;Is it ok?
              2.     Then what queue name should I specify. (ofcousrse it should be the
              MQ queue name but do I need to add that in the JNDI or in the
              weblogic console&#8230;?
              3.     Please confirm that the <connection-factory-jndi-name> mentioned in
              the weblogic-ejb-jar.xml should be the same as what I am passing as
              JNDIName (through weblogic console).
              4.     Kindly advice if I am missing anything (especially in my start-ip
              class)
              Here are my Deployemnt descriptors:
              weblogic-ejb-jar
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic
              7.0.0 EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd">
              <weblogic-ejb-jar>
                   <weblogic-enterprise-bean>
                        <ejb-name>SimpleMDB</ejb-name>
                        <message-driven-descriptor>
                             <pool>
                                  <max-beans-in-free-pool>8</max-beans-in-free-pool>
                                  <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
                             </pool>
                             <destination-jndi-name>ivtQ</destination-jndi-name>               
                             <initial-context-factory>
              com.sun.jndi.fscontext.RefFSContextFactory
              </initial-context-factory>
                             <provider-url>
              file:/D:/JNDI/
              </provider-url>
                             <connection-factory-jndi-name>
              MyQCF
              </connection-factory-jndi-name>
                        </message-driven-descriptor>
                   </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ejb-jar.xml
              <?xml version="1.0"?>
              <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
              JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
              <ejb-jar>
                   <enterprise-beans>
                        <message-driven>
                             <ejb-name>SimpleMDB</ejb-name>
                             <ejb-class>weblogic.jms.whitepaper.SimpleMDB</ejb-class>
                             <transaction-type>Container</transaction-type>
                             <message-driven-destination>
                                  <!-- In WebLogic Server 6.0, this next parameter is named
              "jms-destination-type" -->
                                  <destination-type>javax.jms.Queue</destination-type>
                             </message-driven-destination>
                        </message-driven>
                   </enterprise-beans>
                   <assembly-descriptor>
                        <container-transaction>
                             <method>
                                  <ejb-name>SimpleMDB</ejb-name>
                                  <method-name>*</method-name>
                             </method>
                             <trans-attribute>Required</trans-attribute>
                        </container-transaction>
                   </assembly-descriptor>
              </ejb-jar>
              My Start-up class is as follows:
              import com.ibm.mq.jms.*;
              import java.util.*;
              import javax.jms.*;
              import javax.naming.*;
              import weblogic.common.*;
              public class MQJMSStartup implements T3StartupDef
                   /** * The name of the queue manager to connect to. The startup class
              * will throw an exception if this parameter is not set. */
                   public final static String QM_NAME_PROPERTY = "QManager";
                   /** * The host name where the queue manager runs. If not set, the *
              startup class will create a "bindings mode" connection to a * queue
              manager on the local host. */
                   public final static String QM_HOST_PROPERTY = "QManagerHost";
                   /** * The port number where the queue manager listens. If not set,
              this * defaults to 1414, the default MQSeries port */
                   public final static String QM_PORT_PROPERTY = "QManagerPort";
                   /** * The name in JNDI to store this queue manager object under. * If
              not set, the startup class will throw an exception. */
                   public static final String JNDI_NAME_PROPERTY = "JNDIName";
                   // Required
                   public MQJMSStartup()
                   // Required, but not needed
                   public void setServices(T3ServicesDef services)
                        public String startup(String name, Hashtable args) throws Exception
                        String qmName = (String)args.get(QM_NAME_PROPERTY);
                        System.out.println("*****The qmName is "+qmName);
                        if (qmName == null)
                             throw new Exception("Startup parameter " + QM_NAME_PROPERTY + "
              must be set");
                        String jndiName = (String)args.get(JNDI_NAME_PROPERTY);
                        System.out.println("***The JNDI Nname is "+jndiName);
                        if (jndiName == null)
                             throw new Exception("Startup parameter " + JNDI_NAME_PROPERTY + "
              must be set");
                        String qmHost = (String)args.get(QM_HOST_PROPERTY);
                        System.out.println("*****The qmHost is "+qmHost);
                        String qmPort = (String)args.get(QM_PORT_PROPERTY);
                        System.out.println("*****The qmPort is "+qmPort);
                        MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
                        factory.setQueueManager(qmName);
                        if (qmHost == null)
                             factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
                             factory.setHostName(qmHost);
                             if (qmPort != null)
                                  try
                                       int portNum = Integer.parseInt(qmPort);
                                       factory.setPort(portNum);
                                  catch (NumberFormatException ignore)
                        else
                             factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
                        InitialContext context = new InitialContext();
                        context.bind(jndiName, factory);
                        context.close();
                        StringBuffer buf = new StringBuffer();
                        buf.append( "A connection factory was created for the MQ Queue
              Manager ");
                        buf.append(qmName);
                        buf.append(" and stored in JNDI at ");
                        buf.append(jndiName);
                        System.out.println("*****The mqstartup is executed
              succesfully"+buf.toString());
                        return buf.toString();
              The args that I pass through the weblogic console is as follows:
              QManager=QM_mphasis_eight, JNDIName=MyQCF
              Please advice,
              regards,
              Milan Doshi
              

    Thanks for the response.
              I have written the startUp class but I am getting the following error:
              The Error was:
              The JMS destination with the JNDI name: MySenderQueue could not be
              found. Please ensure that the
              JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS
              destination has been deployed.>
              =====
              My startup class is as follows:
              String qmPort = (String)args.get(QM_PORT_PROPERTY);
              String qmHost = (String)args.get(QM_HOST_PROPERTY);
              String qmName = (String)args.get(QM_NAME_PROPERTY);
              MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
              factory.setQueueManager(qmName);
              factory.setHostName(qmHost);
              if (qmPort != null)
              try
              int portNum = Integer.parseInt(qmPort);
              factory.setPort(portNum);
              catch (NumberFormatException ignore)
              if (qmHost == null)
              factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
              else
              factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
              InitialContext context = new InitialContext();
              context.bind(jndiName, factory);
              QueueConnection connection = factory.createQueueConnection();
              boolean transacted = false;
              QueueSession session = connection.createQueueSession( transacted,
              Session.AUTO_ACKNOWLEDGE);
              Queue ioQueue = session.createQueue("MySenderQueue");
              context.bind("MySenderQueue",ioQueue);
              context.close();
              ===================================================
              My Weblogic-ejb-jar.xml is like this:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>SimpleMDB</ejb-name>
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>8</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>MySenderQueue</destination-jndi-name>
              <connection-factory-jndi-name>
              MyQCF
              </connection-factory-jndi-name>
              </message-driven-descriptor>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ======================================================
              Can you please guide me what is wrong in registering the Queue?
              Thanks once again for the response,
              Milan Doshi
              "sudhir" <[email protected]> wrote in message news:<[email protected]>...
              > Mian,
              >
              > You should pass the Queue Name in the startup class arguments. This would be
              > the same name as the MQ Queue you have defined. There is no need to specify to
              > provider URL to the file ... If you do, then ensure that the the queue name should
              > refer to the MQ Administered Queue object defined by jmsadmin.
              >
              > -Sudhir
              >
              >
              >
              > [email protected] (Milan Doshi) wrote:
              > >Hello ,
              > >
              > >I am supposed to write a Message driven bean that would reside on
              > >Weblogic7.0 and listen to a particular queue of IBM MQ.
              > >
              > >I understand that we need to write a Start-up class for this. I have
              > >written the start-up class but I am getting the following error:
              > >
              > ><Apr 16, 2003 3:17:14 PM EDT> <Warning> <EJB> <010061> <The
              > >Message-Driven EJB: SimpleMDB is unable
              > >to connect to the JMS destination: ivtQ. The EJB container will
              > >automatically attempt to re-establis
              > >h the connection with the JMS server. This warning may occur during
              > >WebLogic Cluster start-up if the
              > > JMS destination is located on another server. When the JMS server
              > >connection is re-established, the
              > > Message-Driven EJB will again receive JMS messages.
              > >The Error was:
              > >The JMS destination with the JNDI name: ivtQ could not be found.
              > >Please ensure that the JNDI name in
              > > the weblogic-ejb-jar.xml is correct, and the JMS destination has been
              > >deployed.>
              > >
              > >I understand that there are some configuration issues:
              > >
              > >Can you please guide where am I going wrong:
              > >1.     What should be the value of the <destination-jndi-name> in the
              > >Weblogic-ejb-jar. I have not passed any Queue name through the
              > >start-up class ?Is it ok?
              > >2.     Then what queue name should I specify. (ofcousrse it should be the
              > >weblogic console??
              > >3.     Please confirm that the <connection-factory-jndi-name> mentioned in
              > >the weblogic-ejb-jar.xml should be the same as what I am passing as
              > >JNDIName (through weblogic console).
              > >4.     Kindly advice if I am missing anything (especially in my start-ip
              > >class)
              > >
              > >Here are my Deployemnt descriptors:
              > >
              > >weblogic-ejb-jar
              > >
              > ><?xml version="1.0"?>
              > ><!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic
              > >7.0.0 EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd">
              > ><weblogic-ejb-jar>
              > >     <weblogic-enterprise-bean>
              > >          <ejb-name>SimpleMDB</ejb-name>
              > >          <message-driven-descriptor>
              > >               <pool>
              > >                    <max-beans-in-free-pool>8</max-beans-in-free-pool>
              > >                    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              > >               </pool>
              > >               <destination-jndi-name>ivtQ</destination-jndi-name>               
              > >               <initial-context-factory>
              > > com.sun.jndi.fscontext.RefFSContextFactory
              > > </initial-context-factory>
              > >               <provider-url>
              > > file:/D:/JNDI/
              > > </provider-url>
              > >               <connection-factory-jndi-name>
              > > MyQCF
              > > </connection-factory-jndi-name>
              > >          </message-driven-descriptor>
              > >     </weblogic-enterprise-bean>
              > ></weblogic-ejb-jar>
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >ejb-jar.xml
              > >
              > ><?xml version="1.0"?>
              > ><!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
              > >JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
              > ><ejb-jar>
              > >     <enterprise-beans>
              > >          <message-driven>
              > >               <ejb-name>SimpleMDB</ejb-name>
              > >               <ejb-class>weblogic.jms.whitepaper.SimpleMDB</ejb-class>
              > >               <transaction-type>Container</transaction-type>
              > >               <message-driven-destination>
              > >                    <!-- In WebLogic Server 6.0, this next parameter is named
              > >"jms-destination-type" -->
              > >                    <destination-type>javax.jms.Queue</destination-type>
              > >               </message-driven-destination>
              > >          </message-driven>
              > >     </enterprise-beans>
              > >     <assembly-descriptor>
              > >          <container-transaction>
              > >               <method>
              > >                    <ejb-name>SimpleMDB</ejb-name>
              > >                    <method-name>*</method-name>
              > >               </method>
              > >               <trans-attribute>Required</trans-attribute>
              > >          </container-transaction>
              > >     </assembly-descriptor>
              > ></ejb-jar>
              > >
              > >
              > >My Start-up class is as follows:
              > >
              > >import com.ibm.mq.jms.*;
              > >import java.util.*;
              > >import javax.jms.*;
              > >import javax.naming.*;
              > >import weblogic.common.*;
              > >
              > >
              > >public class MQJMSStartup implements T3StartupDef
              > >{
              > >     /** * The name of the queue manager to connect to. The startup class
              > >* will throw an exception if this parameter is not set. */
              > >     public final static String QM_NAME_PROPERTY = "QManager";
              > >     
              > >     /** * The host name where the queue manager runs. If not set, the *
              > >startup class will create a "bindings mode" connection to a * queue
              > >manager on the local host. */
              > >     public final static String QM_HOST_PROPERTY = "QManagerHost";
              > >     
              > >     /** * The port number where the queue manager listens. If not set,
              > >this * defaults to 1414, the default MQSeries port */
              > >     public final static String QM_PORT_PROPERTY = "QManagerPort";
              > >          
              > >     /** * The name in JNDI to store this queue manager object under. * If
              > >not set, the startup class will throw an exception. */
              > >     public static final String JNDI_NAME_PROPERTY = "JNDIName";
              > >
              > >     // Required
              > >     public MQJMSStartup()
              > >     {
              > >     }
              > >
              > >     // Required, but not needed
              > >     public void setServices(T3ServicesDef services)
              > >     {
              > >     }
              > >
              > >          public String startup(String name, Hashtable args) throws Exception
              > >     {
              > >          String qmName = (String)args.get(QM_NAME_PROPERTY);
              > >          System.out.println("*****The qmName is "+qmName);
              > >          if (qmName == null)
              > >          {
              > >               throw new Exception("Startup parameter " + QM_NAME_PROPERTY + "
              > >must be set");
              > >          }
              > >          String jndiName = (String)args.get(JNDI_NAME_PROPERTY);
              > >          System.out.println("***The JNDI Nname is "+jndiName);
              > >          if (jndiName == null)
              > >          {
              > >               throw new Exception("Startup parameter " + JNDI_NAME_PROPERTY + "
              > >must be set");
              > >          }
              > >          String qmHost = (String)args.get(QM_HOST_PROPERTY);
              > >          System.out.println("*****The qmHost is "+qmHost);
              > >          String qmPort = (String)args.get(QM_PORT_PROPERTY);
              > >          System.out.println("*****The qmPort is "+qmPort);
              > >          MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
              > >          factory.setQueueManager(qmName);
              > >          if (qmHost == null)
              > >          {
              > >               factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
              > >               factory.setHostName(qmHost);
              > >               if (qmPort != null)
              > >               {
              > >                    try
              > >                    {
              > >                         int portNum = Integer.parseInt(qmPort);
              > >                         factory.setPort(portNum);
              > >                    }
              > >                    catch (NumberFormatException ignore)
              > >                    {
              > >
              > >                    }
              > >               }
              > >          }
              > >          else
              > >          {
              > >               factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
              > >          }
              > >
              > >          InitialContext context = new InitialContext();
              > >          context.bind(jndiName, factory);
              > >          context.close();
              > >          StringBuffer buf = new StringBuffer();
              > >          buf.append( "A connection factory was created for the MQ Queue
              > >Manager ");
              > >          buf.append(qmName);
              > >          buf.append(" and stored in JNDI at ");
              > >          buf.append(jndiName);
              > >          System.out.println("*****The mqstartup is executed
              > >succesfully"+buf.toString());
              > >          return buf.toString();
              > >     }
              > >}
              > >
              > >
              > >
              > >
              > >The args that I pass through the weblogic console is as follows:
              > >
              > >QManager=QM_mphasis_eight, JNDIName=MyQCF
              > >
              > >
              > >
              > >
              > >
              > >Please advice,
              > >
              > >regards,
              > >
              > >Milan Doshi
              

  • MDB rollbacks and stops the listener port with error code 2072

    Hi
    We have a MDB listening on QUEUE1. This MDB processes the message and puts another message in QUEUE2. Transaction is "required" for this MDB.
    The processing could somtime take more than 2 min. We used to get EJB timeout error in this scenario. We changed EJB timeout to 5 min (default was 2 min). This resolved the timeout error. But it started throwing following exception. Note that if the processing takes less than 2 min, MDB never rollbacks.
    After this rollack, listener port can not pick up the next message and it throws error (MQJMS2002: failed to get message from MQ queue. MQ Error Code 2072) . It stops as a result and restarts after 60 sec. Even after restart it can not process the messages till we restart the JVM.
    Regarding error handling, Backout threshold is 3. If the message is redelivered, we discard this message.
    We are using 2 Phase commit for 2 resources MQ (5.3) and MS SQL.
    Websphere version is 5.1.
    Two issues here
    1. Why is MDB rolling back if processing takes more than 2 min.
    2. After the rollback, why is listener port not picking up the messages. Why do we need to recycle the JVM.
    Any pointers to resolve this issue?
    EXCEPTION
    [11/29/05 15:03:37:752 EST] 1b9bccc XATransaction E J2CA0027E: An exception occurred while invoking end on an XA Resource Adapter from dataSource JMS$postprocessor$JMSManagedConnection@25078403, within transaction ID {XID: formatId(57415344), gtrid_length(51), bqual_length(2, data(00000000000000950000000113238145f813eccfef12249c6aab206666f96901636c5f6170703130355f73656e7431715f716113238145f813eccfef12249c6aab206666f969010000000100000000)}: javax.transaction.xa.XAException: XA operation failed, see errorCode
    at com.ibm.mq.MQXAResource.end(MQXAResource.java:520)
    at com.ibm.ejs.jms.JMSManagedSession$JMSXAResource.end(JMSManagedSession.java:1557)
    at com.ibm.ejs.j2c.XATransactionWrapper.end(XATransactionWrapper.java:525)
    at com.ibm.ws.Transaction.JTA.JTAResourceBase.end(JTAResourceBase.java:253)
    at com.ibm.ws.Transaction.JTA.RegisteredResources.distributeEnd(RegisteredResources.java:629)
    at com.ibm.ws.Transaction.JTA.TransactionImpl.internalPrepare(TransactionImpl.java:1241)
    at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:981)
    at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:150)
    at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:177)
    at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:712)
    at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167)
    at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:570)
    at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3068)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
    [11/29/05 15:03:38:089 EST] 1b9bccc ServerSession W WMSG0031E: Exception processing JMS Message for MDB BatchProcessorMDB, JMSDestination jms/PostprocessorQ : javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
    com.ibm.ws.exception.WsEJBException
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:159)
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
    at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3159)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
    javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExceptionMappingStrategy.java:96)
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:165)
    at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
    at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3159)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
    [11/29/05 15:03:38:124 EST] 1e9aa18 JMSExceptionL E WMSG0018E: Error on JMSConnection for MDB BatchProcessorMDB , JMSDestination jms/PostprocessorQ : javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
    at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:553)
    at com.ibm.mq.jms.MQSession.consume(MQSession.java:3144)
    at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
    at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
    at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
    at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
    at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
    at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
    ---- Begin backtrace for Nested Throwables
    com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072
    at com.ibm.mq.jms.MQSession.consume(MQSession.java:3118)
    at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
    at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
    at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
    at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
    at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
    at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
    [11/29/05 15:03:38:149 EST] 1e9aa18 JMSExceptionL E WMSG0057E: Error on JMSConnection for MDB BatchProcessorMDB , JMSDestination jms/PostprocessorQ , JMS Linked Exception : com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072
    at com.ibm.mq.jms.MQSession.consume(MQSession.java:3118)
    at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
    at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
    at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
    at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
    at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
    at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
    [11/29/05 15:03:38:190 EST] 1e9aa18 MDBListenerIm I WMSG0043I: MDB Listener ProcessorLP stopped for JMSDestination jms/PostprocessorQ
    [11/29/05 15:03:38:192 EST] 1e9aa18 MDBListenerIm I WMSG0058I: Listener Port ProcessorLP will attempt to restart in 60 seconds
    [11/29/05 15:03:38:194 EST] 1e9aa18 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource jms/PostprocessorQF. The exception which was received is javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
    [11/29/05 15:04:38:230 EST] 1436f66 MDBListenerIm I WMSG0042I: MDB Listener ProcessorLP started successfully for JMSDestination jms/PostprocessorQ

    Have been able to solve this problem? The same occurs in our environment. I have a nagging feelin git has something to do with a known bug that is solved in some fixpack or something. We're on Websphere 5.1.1.4.
    Any feedback would be appreciated.
    Thanks,
    Jaap

  • MDB and "stuck" messages

    Hi,
    We're developing a MDB listening to a AQ/JMS database persistant queue, on a Oracle JMS provider.That MDB as to be bullet proof (no lost messages), and that's why we're using database persistance.So far everything is working fine, but we have one issue that cause some headackes.
    For what I know, the onMessage() method doesn't acknowledge to the provider until the method completes, without trowing an exception. In that case, the provider rollback so he can try to redeliver the message again. Since we have some important processing done within the onMessage() method, we were worried about what would happen if the MDB crash (java code crash, server crash, sledgehammer hit). I tryed to read that message via a java class I wrote, but I couldn't. (i guess the message is still waiting for the acknowledge)
    So to make it short, I placed a "thread.Sleep" in the middle of the onMessage() method, I deployed it on my application server, put a message in the queue, and I pressed the reset button of my machine. The result was that the message was still in the queue (that's nice since we didn't lost it), but never redelivered, and after some time (like 12h), the message was gone of the database and not delivered. (the message expiration was set to 0)
    So the big question would be: what happen to a JMS message if the MDB crash for any reason and what's the behavior of the JMS provider, and if there's anything we can do to redeliver that "stuck" message?
    I guess the provider keep the status of each message somewhere in the database (something that says to him that the message is in develery, waiting for acknowledge).
    Thanks

    Most likely this is some server configuration issue and not an actual programming problem (because as you say yourself, on another system it works). I can advise only two things.
    - dig through the weblogic documentation
    - take your question to the weblogic forum
    https://forums.oracle.com/forums/category.jspa?categoryID=193

  • Load balancing and clustered MDBs using a Queue

    With the following advice/information from
              http://e-docs.bea.com/wls/docs61/faq/jms.html#252978,
              "One customer had an example where topic MDBs are needed in which there will
              be multiple implementations of the MDBs listening on the same topic. In
              other words, more than one MDB with a different implementation may be
              subscribing to the same topic. The client has no advanced way of knowing how
              many different kinds of MDBs may be listening on the same topic, but it is
              possible for there to be more than one listener, therefore topics, not
              queues. For each kind of MDB listening on the topic, the message is
              delivered exactly once (i.e., the message will be delivered exactly once to
              an instance in each named MDB pool listening on the topic)."
              If I have a set of MDB's scraping Messages from the JMS Queue, what is the
              load-balancing behavior?
              1) Consider a lightly-loaded system, where each MDB has sufficient time to
              process the message before the next one shows up in the queue. Will the same
              MDB get all the messages?
              2) Consider a heavily-loaded system, where each MDB has insufficient time to
              process the message before the next one shows up in the queue. How would you
              characterize the de facto load-balancing behavior? least-loaded?
              

    Have you tried the SAP WebDispatcher.  This should acomplish what you want. 
    http://help.sap.com/saphelp_nw04/helpdata/en/42/5cfd3b0e59774ee10000000a114084/frameset.htm

Maybe you are looking for

  • How to call a FrontEnd DLL in ABAP Program

    In one of our ECC 5 projects, we are requested to call a DLL locates on frontend with SAPGUI 640 installed to read/write a IC card with connected to Frontend. I searched the forum, seems every one refer to Object CL_GUI_FRONTEND_SERVICE and Method 'E

  • Windows 8 ask for password - I don't want to enter it

    When my laptop starts it shows my email address and asks for my password. I do not want to enter a password . How do I get rid of this because my wife would like to use the computer

  • Flash player will not install on my mac

      I have been trying to install the new flash player on my iMac for almost a month now to no avail. I have scoured both adobe and apple's forums and have tried everything that has been suggest and still nothing. Can I please get some help regarding t

  • SAP PS (Project System) + Primavera intgration -- Help Needed

    Hi All, I have to integrate the SAP PS system to a tool named Primavera using XI. I dont know whta sort of adapter is supported by Primavera. It is going to be a oneway data transfer from SAP-->Primavera , whenever some project info created / updated

  • Jct.dll with JCOP&Eclipse

    Hi all, I am trying to write a host application in Eclipse using JCOP offcard API and keep getting the following error java.lang.UnsatisfiedLinkError: no jct in java.library.path java.lang.UnsatisfiedLinkError: setup      at com.ibm.jc.terminal.Nativ