Configuring an MDB to an MQSeries Queue

I want complete details as to how to configure an MDB to an MQSeries Queue.
          

From the JMS FAQ at http://e-docs.bea.com/wls/docs70/faq/jms.html
          Q. How do I integrate non-WebLogic JMS providers with WLS?
          A. Refer to the white paper, "Using Foreign JMS Providers with WebLogic
          Server" (jmsproviders.pdf) on
          http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
          for a discussion on integrating MQ Series, IBus MessageServer, Fiorano,
          and SonicMQ.
          Or google search this newsgroup for "MQ".
          Tom
          Ranjit wrote:
          > I want complete details as to how to configure an MDB to an MQSeries Queue.
          

Similar Messages

  • Configure OC4J MDB to listen WebLogic queue

    Hi
    Is it possible to configure message driven beans (via deployment descriptors and OC4J config files with OracleAS JMS or OJMS) to listen to a remote queue? The remote queue is hosted on a WebLogic platform?
    I've tried quite a few ways of doing it using only OracleAS JMS (OJMS is for AQ only) and fiddled endlessly with deployment descriptors and config files but no luck!
    Help will be appreciated.
    Thanks

    Zain,
    Actually, Oracle Application Server does not support WebLogic in a transparent way. You may have to write a message listener thread that runs on the server side and use the orion-application.xml descriptor to include the url of the WebLogic server where the Queues do reside.
    I have a similar setup currently in production, if you are interested in further details.
    Rick B.

  • MDB on MQSeries queue undeployment

    I just started testing MDBs listening on MQSeries queues. WLS 6.1 and MQ 5.1. I followed
    the instructions in the BEA foreign JMS providers white paper, deployed the MDBs,
    queued messages and things seemed to work. But shutting down the server revealed
    that the undeployment of each MDB was slow. Slower than SSBs or MDBs listening on
    BEA queues. Would appreciate any suggestions about what it could be. Thanks.

    I just started testing MDBs listening on MQSeries queues. WLS 6.1 and MQ 5.1. I followed
    the instructions in the BEA foreign JMS providers white paper, deployed the MDBs,
    queued messages and things seemed to work. But shutting down the server revealed
    that the undeployment of each MDB was slow. Slower than SSBs or MDBs listening on
    BEA queues. Would appreciate any suggestions about what it could be. Thanks.

  • Configuring MDB to receive message from MQSeries Queues bound on WL JNDI

    Hi,
    I am using weblogic7.0 sp2. I need to configure my MDB to receive message from MQ Series (on a different server). The queue is bound to WL JNDI using a server startup program.
    Anyone with experiece, please help.
    Thanks,
    Fasih

    I'd start here:
    http://e-docs.bea.com/wls/docs70/faq/index.html
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Throttling MDB performance running against MQSeries queue

    I have an unusual requirement for an application. We have a non-transactional MQSeries queue that is bound as a foreign JMS destination in client mode (thanks to the folks on the forum who helped me configure that!).
              The problem is that the cluster that we are running our application on has limited capacity and I need to make sure that the MDB that will be listening to the queue does not surpass a certain TPS limit (say, 1 TPS). This article explains how to throttle performance using a separate execute thread -- http://e-docs.bea.com/wls/docs81/perform/AppTuning.html#1105201
              However, this requires you to set the MDB's "dispatch-policy' attribute to the lower priority queue in ejb-jar.xml. However, the documentation on this attribute -- http://edocs.beasys.com/wls/docs81/ejb/DDreference-ejb-jar.html#1113605 -- indicates that this attribute is only honoured if the source queue is transactional in nature.
              What to do? A transactional queue is a hard sell to our infrastructure folks. Can I use the extended transactional client and have this work?
              FYI - using the max-beans-in-free-pool does not do a sufficiently good job of limiting performance.
              Any other ideas?

    another possibility might be the following scenario:
              create a local jms-destination, maybe with a jdbc-store.
              then use the weblogic bridge to transfer messages into the local jms-queue.
              at this point you can configure flow-control for the connection factory
              to limit transferred messages.
              the problem in this case is, that unprocessed messages have to be stored
              on the application server or in the database.
              but maybe this can help you.
              --Klaas
              gbrail schrieb:
              > As the doc describes, your MDB's "onMessage" method is invoked by a thread created by MQ. That means we have no control over it, or how fast it runs. I don't know of any "throttling" features in MQ either that would help.
              >
              > The only (ugly!) suggestion I can think of is that you should set "max-beans-in-free-pool" to 1 and periodically "sleep" in your onMessage method so that you don't get messages too fast!
              >
              > (And even if you were able to use a separate execute queue, or a transactional queue, you still could potentially get messages more than once per second, so you might still need to sleep anyway.)

  • Can 1 MDB configured to receive messages from 2 Queues

    Hi,
    Is is possible to configure 1 MDB to listen to 2 queues

    Deploying the very same MDB twice is not a "trick" or unusual as your comment suggests. A MDB is a stateless component. It just receives messages. If you deploy the same MDB twice and link it to different queues, it is exactly as if one MDB where configured to receive from 2 queues.
    So everything is possible with MDBs. You can consume from multiple destinations and can even mix queues and topics. The only thing you must keep in mind is that you have at least that many MDB instances (of the same MDB) as destinations (= MDB deployments). However, for scalability reasons you would have multiple MDB instances in most cases.
    I don't see a reason why sombody should switch to a proprietary thing like your MDS and I don't understand why you mention this in nearly every post. Buy banner ads instead.
    -- Andreas

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

  • Using MDB with IBM MQSeries

              Hi All,
              I want to use MDB with MQSeries as Messaging medium.
              My Weblogic App. server version is 6.0
              I want MDB to get invoked whenever any message comes in MQSeries queue.
              I think 8.1 version provides a option to add external JMS server.
              Is it possible in 6.0 version?
              Please let me know ASAP.
              Waiting for reply!
              Thanks,
              Prasanna Laddha
              

    Hi Prasanna,
              The best resource is the white-paper, which mentions MQ directly:
              http://dev2dev.bea.com/resourcelibrary/whitepapers/jmsproviders.jsp
              But it does not take into account the following 8.1 feature:
              http://edocs.bea.com/wls/docs81/ConsoleHelp/jms_config.html#accessing_foreign_providers
              Tom
              prasanna wrote:
              > Hi Tom,
              > I had weblogic 7 now.
              > Is there any document which can help me in setting up connection with MQSeries
              > for MDB beans?
              >
              > Pls let me know ASAP.
              > Thanks lot.
              > Prasanna
              >
              >
              >
              > Tom Barnes <[email protected]> wrote:
              >
              >>In 6.0, for non-transactional case, I'm fairly
              >>sure that you can drive the MDB directly from MQ. See
              >>the white-paper:
              >>
              >>http://dev2dev.bea.com/resourcelibrary/whitepapers/jmsproviders.jsp
              >>
              >>But, as with most customers, my guess is that you need
              >>to transfer the messages transactionally
              >>(exactly-once). In which case more work is needed:
              >>
              >>By far the easiest option is to upgrade to WL7.0 or
              >>WL8.1 which can drive an MDB transactionally
              >
              >>from MQ directly. WL8.1 provides enhancements
              >
              >>to wrap foreign vendor resources to simplify
              >>the process even farther.
              >>
              >>Another option is to use a WL6.1SP3 or later
              >>server running a messaging bridge to bridge from MQ
              >>to WL6.0. I'm not sure if these are capable of
              >>bridging to 6.0 exactly-once (transactionally) though.
              >>
              >>For the transactional case, I think you will
              >>end up needing to
              >>write your own "bridge" that runs from within
              >>a startup class or servlet.
              >>The following example shows how to bridge from
              >>wl to mqseries transactionally using a startup class.
              >>To drive the MDB exactly-once, you will need
              >>modify this code to do bridge from MQ into
              >>a WL queue instead, then the queue in turn can
              >>be used to drive the WL MDB:
              >>
              >>http://dev2dev.bea.com/codelibrary/code/mqseries.jsp
              >>
              >>Tom
              >>
              >>
              >>Prasanna wrote:
              >>
              >>>Hi All,
              >>>I want to use MDB with MQSeries as Messaging medium.
              >>>My Weblogic App. server version is 6.0
              >>>
              >>>I want MDB to get invoked whenever any message comes in MQSeries queue.
              >>>I think 8.1 version provides a option to add external JMS server.
              >>>Is it possible in 6.0 version?
              >>>
              >>>Please let me know ASAP.
              >>>Waiting for reply!
              >>>Thanks,
              >>>Prasanna Laddha
              >>>
              >>
              >
              

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

  • Oracle 8i and MQseries queues

    Is there any possibility to access MQSeries queues using 8i AQ packages routines? I have to read some data from MQS and insert it into Oracle on Win2k and wonder if I need any additional MQ interfaces.
    Best regards,
    Tomek.

    Hi Brajesh,
    Have you ever set up communication between Oracle 9i and MQSeries?
    Now I'm trying to read MQ messages using Oracle AQ and Messaging Gateway.
    When I'm starting MGW agent i get error message: 'bad native queue' in log file.
    Agent is still running and reachable.
    Is it possible that i need local MQ queue manager?
    Could you please help me with this?
    Regards,
    Tomek.

  • How to configure my MDB serve only one message at a time?

    Hi All,
    I have requirement where I need to develope a MDB iin weblogic. This MDB has to serve only one message at a time. If the send second message is sent while the first one is running the second message has to sit in queue and start processing once the first message is finished.
    Is there any way to configure via annotations or in weblogic server settings ?
    Any help would be really appreciated...
    Thank you,
    K.

    Here is my client code to send the message
    Connection connection = null;
    javax.jms.Session session = null;
    MessageProducer producer = null;
    try
    connection = lpConnectionFactory.createConnection();
    session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
    // Create a MessageProducer from the Session to the Validation Queue
    producer = session.createProducer(myQueue);
    ((WLMessageProducer)producer).setUnitOfOrder();
    // Create a message
    ObjectMessage message = session.createObjectMessage();
    message.setObject(params);
    message.setStringProperty(MyServiceConstants.OPERATION, operation);
    // Send the message to the queue
    producer.send(message);
    finally
    if (producer != null)
    producer.close();
    if (session != null)
    session.close();
    if (connection != null)
    connection.close();
    Following is the weblogic-ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>TestMDB</ejb-name>
    <message-driven-descriptor>
         <pool>
              <max-beans-in-free-pool>1</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
         </pool>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

  • MDB not dequeuing the Queue

    Hi Guys.
    Im working with oc4j_extended_101300 and a MDB with annotations
    I've got a jsp that sends a message to the queue. This seems to work. I can see in the administrative console that the "Messages Waiting for Read" is modified each time I send a message.
    But my MDB is not reading those messages. The onMessage() is never called.
    The annotations in my MDB are:
    @MessageDriven(activationConfig = {
    @ActivationConfigProperty(propertyName="messageListenerInterface", propertyValue="javax.jms.MessageListener"),
    @ActivationConfigProperty(propertyName="connectionFactoryJndiName", propertyValue="jms/NewMessageFactory"),
    @ActivationConfigProperty(propertyName="destinationName", propertyValue="jms/NewMessage"),
    @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
    @ActivationConfigProperty(propertyName="messageSelector", propertyValue="RECIPIENT = 'MDB'") })
    The Factory and the Queue are also defined in de jms.xml
    Am I forgetting about a configuration somewhere??
    I hope you can help.

    Does your jsp put the selector value (RECIPIENT='MDB') in the Message object?
    I think it would be like this:
    on your Message object: setStringProperty("RECIPIENT","MDB");

  • Best way to configure redelivery limit value for a Queue

    Hello,
    My doubt is related to configuring the JMS Redelivery Limit property from Weblogic 9.2 Server.
    We must support redelivery attempts in our queue, with a redelivery delay of 30s. So, we have set the queue's Redelivery Limit property to -1, via Console Configuration:
    Settings for My_DQueue -> Delivery Failure -> Redelivery Limit = -1
    The consumer of that queue is a MDBBean, which extends org.springframework.ejb.support.AbstractJmsMessageDrivenBean.
    The producers to that queue are weblogic.jms.extensions.WLMessageProducer.
    That queue has an error queue configured as Error Destination.
    Then, the WLMessageProducer is the one who specifies that value:
    WLMessageProducer messageProducer = (WLMessageProducer)queueSession.createProducer(queue);
    messageProducer.setRedeliveryLimit(5);However, we will not be able to ensure that all message producers pointing that queue will specifiy that redelivery limit. This may lead us to problems, as default queue Redelivery Limit is set to -1, and messages without specified redelivery limit would be redelivered indefinitely.
    I'd like to know if there is any way to specify a MAXIMUM redelivery limit value for a JMS queue. For example: fixing that limit to 10. If producers specify by themselves a redelivery limit lower than such value, that limit is applied to messages. Otherwise, the configured default limit value is used.
    Another option we have considered is to include, in the MDB's onMessage() method, a validation of the "JMS_BEA_RedeliveryLimit" message property:
    This validation would check whether no redelivery limit is configured in the Producer, and would forward such messages directly to the error queue, from the MDB, when the "JMSXDeliveryCount" outnumbers our fixed value:
    public void onMessage(Message message) {
       try {
          if(message.getIntProperty("JMS_BEA_RedeliveryLimit")<0){
             //MESSAGE FOUND WITHOUT REDELIVERY LIMIT SPECIFIED BY PRODUCER.
             //POTENTIAL DANGER OF BEING REDELIVERED INDEFINETELY
             int deliveryCount = message.getIntProperty("JMSXDeliveryCount");
             if(deliveryCount>10){
                 //CAN I FORWARD MESSAGE TO ERROR DESTINATION?But we were not able to found such examples to achieve this
    Thanks in advance!
    Joan Esteve

    Hi Joan,
    I just double-checked, and as far as I can tell the options for setting a redelivery limit include programmatically on the Producer or by configuring an override on the Destination. Unfortunately, you need the override to only take effect if the delivery limit hasn't already been set. (If we had a default deliverylimit configurable on our connection factory, this would have done the trick.)
    I think you've already hit upon the solution: your consumers can check each received message's JMSXDeliveryCount and act accordingly. It's fine for a consumer to use the JMS_BEA_RedeliveryLimit property see if the Limit has been set by a producer, and then check JMSXDeliveryCount to check the delivery count, but I'm not sure if the JMS_BEA_RedeliveryLimit property is set in older versions (8.1 may not have it for example).
    As a refinement, you may want to use the WLMessageProducer forward() API. This is an alternative to send() that preserves the message-id and timestamp of a consumed message. I don't think forward() allows any modification of the consumed message before it's forwarded.
    Hope this helps,
    Tom
    Edited by: Tom B on Feb 22, 2013 10:03 AM

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

  • Error connecting WLS 10.3.1 JMS & MDBs with Oracle Advanced Queuing

    I followed the guide at http://blogs.oracle.com/imc/2010/12/how_to_use_oracle_aq_with_message-driven_beans_in_weblogic.html. Since the AQ queues were already set up by SAs and had been working with stateless session beans, I assume they're OK for use with MDBs. Names had to be changed in the WLS foreign server definition, destinations & connection factories to match.
    My MDB is:
    package xxxx;
    import javax.ejb.MessageDriven;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.TextMessage;
    @MessageDriven(name = "TestQueueListenerEJB")
    public class TestQueueListener implements MessageListener
    public void onMessage(Message message)
    if ( message instanceof TextMessage )
    try
    System.out.println("AQMDBTest: text message " + ((TextMessage)message).getText() + " processed");
    catch (JMSException e)
    e.printStackTrace();
    else
    System.out.println("AQMDBTest: generic message " + message.toString() +
    " of type " + message.getClass().getName() + " processed");
    And the relevant portion of the weblogic-ejb-jar.xml is:
    <weblogic-enterprise-bean>
    <ejb-name>TestQueueListenerEJB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>1</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>TestQueue</destination-jndi-name>
    <connection-factory-jndi-name>TestQueueConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    So when I deploy this to my test domain I get an error:
    <Feb 23, 2011 3:11:28 PM CST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: TestQueueListenerEJB is unable to connect to the
    JMS destination: TestQueue. The Error was:
    Can not get destination information. The destination JNDI name is TestQueue, the provider URL is null>
    The test connection of the datasource is successful.
    What else could I have wrong? This is my first post to this topic. Please let me know what additional information I need to provide about this. Or if I've provided too much.
    Thanks very much,
    Jim Greetham

    OK. So I got my DBAs to create a new user with the necessary privs. Created a new queue, table, etc. I have been able to receive messages from it. So I have some looking to do in my production database queue definitions.
    Jim

Maybe you are looking for