Only one Message Driven Bean

hi
i have some heavy calculating beans and i want that only one EJB is calculating at one time. can i do this by using Message Driven Beans? is it possible that the server creates only one Message Driven Bean at one time and gets the next one out of the queue when the old one finished calculating?
thanks, jo

It is possible to set up that there should be only one mdb in the pool, but it's not quite what mdbs are intended for. Remember that this is an asynchronous message service, and you will not receive a reply after you put a message on the queue.

Similar Messages

  • WLS Cluster with Message Driven Beans and MQSeries on more than one Host

              With the Examples of http://developer.bea.com/jmsproviders.jsp and http://developer.bea.com/jmsmdb.jsp
              a MDB can be
              configured to work with MQSeries with one WLS Server. This works only, if a Queuemanager
              is started at the same Host that runs the WLS Server too.
              And the QueueConnectionFactory (QCF) is configured to TRANSPORT(BIND).
              In my configuration should be two WLS Servers and one JMS Queue (MQS) with the
              Queuemanager.
              A Message Driven Bean is deployed on both WLS Servers wich should get the Messages
              of this Queue.
              If one of the two WLS Servers fails the other WLS Server with the corresponding
              MDB should get the Messages of the
              MQSeries Queue.
              If the QCF is configured to TRANSPORT(Client) the Message Driven Bean can't start
              and the following Exception is thrown:
              <Jul 18, 2001 3:52:49 PM CEST> <Error> <J2EE> <Error deploying EJB Component :
              mdb_deployed
              weblogic.ejb20.EJBDeploymentException: Error deploying Message-Driven EJB:; nested
              exception is:
              javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for
              'btsun1a:TEST'
              javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'btsun1a:TEST'
              at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:434)
              I'm wondering, because their is a MQQueueManager on btsun1a; all Servers throws
              the same Exception when the MDB is deployed.
              The configuration of JMSadmin on both Hosts is the following:
              dis qcf(myQCF2)
              HOSTNAME(btsun1a)
              CCSID(819)
              TRANSPORT(CLIENT)
              PORT(1414)
              TEMPMODEL(SYSTEM.DEFAULT.MODEL.QUEUE)
              QMANAGER(TEST)
              CHANNEL(JAVA.CHANNEL)
              VERSION(1)
              dis q(myQueue)
              CCSID(819)
              PERSISTENCE(APP)
              TARGCLIENT(JMS)
              QUEUE(MYQUEUE)
              EXPIRY(APP)
              QMANAGER(TEST)
              ENCODING(NATIVE)
              VERSION(1)
              PRIORITY(APP)
              I think only TRANSPORT(CLIENT) can be used when i don't wan't to install a Queue
              and a QueueManager on each WLS Server.
              Does anybody know a problem of WLS 6.0 SP2 to cope with TRANSPORT(CLIENT)?
              

              With the Examples of http://developer.bea.com/jmsproviders.jsp and http://developer.bea.com/jmsmdb.jsp
              a MDB can be
              configured to work with MQSeries with one WLS Server. This works only, if a Queuemanager
              is started at the same Host that runs the WLS Server too.
              And the QueueConnectionFactory (QCF) is configured to TRANSPORT(BIND).
              In my configuration should be two WLS Servers and one JMS Queue (MQS) with the
              Queuemanager.
              A Message Driven Bean is deployed on both WLS Servers wich should get the Messages
              of this Queue.
              If one of the two WLS Servers fails the other WLS Server with the corresponding
              MDB should get the Messages of the
              MQSeries Queue.
              If the QCF is configured to TRANSPORT(Client) the Message Driven Bean can't start
              and the following Exception is thrown:
              <Jul 18, 2001 3:52:49 PM CEST> <Error> <J2EE> <Error deploying EJB Component :
              mdb_deployed
              weblogic.ejb20.EJBDeploymentException: Error deploying Message-Driven EJB:; nested
              exception is:
              javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for
              'btsun1a:TEST'
              javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'btsun1a:TEST'
              at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:434)
              I'm wondering, because their is a MQQueueManager on btsun1a; all Servers throws
              the same Exception when the MDB is deployed.
              The configuration of JMSadmin on both Hosts is the following:
              dis qcf(myQCF2)
              HOSTNAME(btsun1a)
              CCSID(819)
              TRANSPORT(CLIENT)
              PORT(1414)
              TEMPMODEL(SYSTEM.DEFAULT.MODEL.QUEUE)
              QMANAGER(TEST)
              CHANNEL(JAVA.CHANNEL)
              VERSION(1)
              dis q(myQueue)
              CCSID(819)
              PERSISTENCE(APP)
              TARGCLIENT(JMS)
              QUEUE(MYQUEUE)
              EXPIRY(APP)
              QMANAGER(TEST)
              ENCODING(NATIVE)
              VERSION(1)
              PRIORITY(APP)
              I think only TRANSPORT(CLIENT) can be used when i don't wan't to install a Queue
              and a QueueManager on each WLS Server.
              Does anybody know a problem of WLS 6.0 SP2 to cope with TRANSPORT(CLIENT)?
              

  • Can you set isolation levels of message-driven bean transactions?

    The problem: I have 3 different message-driven beans which each get a different type of message, except for a field that is common to all. That field is used as the primary key of an entity object. The message-driven beans configured to use a container managed transaction. Each message-driven bean, in processing the message, first does a lookup by primary key to see if the object associated with the key exists, and if it does not, it requests the entity's home object to create it. After that, they do further processing. The problem is that sometimes all the beans simultaneously get a message, resulting in each bean checking for the entity object at about the same time, and if they fail to find it (because none of them has created it yet), each creates an object, all with the same primary key. This is not caught until the beans start to complete their onMessage method, which I believe results in the container committing the transaction. One of the transactions will be committed successfully, while the other two will fail, get rolled back, and then be retried with the same message. The second time through, the other beans will find the entity object (since it has been created and committed) and they will complete correctly. In the end, they right thing occurs, except that there is a troubling exception or 2 in the log telling about the constraint violation (with the primary key) and the rollback. If it was just me, that would be fine, but our customer does not like to see exceptions in the log; that indicates to him that something is wrong.
    So, I am looking for someway to make sure that the actions of the message-driven beans are serialized. One suggestion from a colleague was to set the isolation level of the transactions being used by the container in processing the message-driven beans' onMessage method. However, the documentation does not mention any way to do this for a message-driven bean. Suggestions?
    Is the use of a UserTransaction a better way to do this? If I acquire a UserTransaction within the onMessage method of a message-driven bean, can I set its isolation level? How would this work? When I get a UserTransaction, does each client get a different transaction, or do they all get the same one?

    (1) The WebLogic JMS "unit-of-order" feature is a heavily adopted feature that was specifically designed to handle similar use cases - see the JMS developer guide for extensive documentation. In your use case, if "key" is used to define UOO, then there's no limit on the number of keys that can be processed concurrently, but messages for any particular key will be processed single-threaded in the order in which they were first submitted.
    Note that if you're using distributed destinations, the UOO feature is still fully supported - but the developer and/or administrator needs to decide whether to configure the destination to use "hash" or "path service" based routing (the JMS UOO edoc outlines the trade-offs).
    (2) Another alternative is to use a single MDB with max-beans-free-pool that processes all three types (as the other poster suggested). I think this assumes all MDBs run on the same JVM.
    (3) Another alternative is to use multiple queues, with a single MDB on each Q. Where some sort of hash algorithm is used to determine which Q is for the key. This approach is a "hand-coded" variant of the approach in (1) with "hash" based routing enabled...
    (4) If all MDBs actually do run in the same JVM, a third alternative is to use code the application to use a common lock to protect each key, eg, something like:
    // assume MyLock is simply a class with a "reference counter"
    // assume some global "staticHM" hash map that is all MDBs can access
    onMessage() {
    MyLock lock = null;
    key= msg.getKey();
    synchronized(staticHM) {
    lock = staticHM.get();
    if (lock = null) {
    lock = new lock();
    staticHM.put(key, new lock());
    lock.incRefCount();
    try {
    synchronized(lock) {
    // only one onMessage will be able to lock a particular key at a time
    do your work;
    } finally {
    synchronized(staticHT) {
    if (lock.defRefCount() == 0) staticHM.remove(lock);
    if (lock = null) staticHM.put(key);
    If multiple threads get a message with the same key, then only one thread at a time will work on the key.
    Hope this helps,
    Tom

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

  • Error during deployment of Message Driven Bean

    Environment: WLS 6.1SP3 on Win2K SP2, non-clustered.
              I am getting some error (or perhaps warning) during deployment of Message
              Driven Bean. Any one seen this before?
              This error only comes on a machine with Dual Network card.
              Thanks.
              ####<Dec 11, 2002 1:23:04 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
              <system> <> <010008> <EJB Deploying file: AppRuntime.jar>
              ####<Dec 11, 2002 1:23:04 AM GMT> <Warning> <J2EE> <QAAPP01> <Makalu> <main>
              <system> <> <160007> <You are running WebLogic Server with J2EE 1.3 features
              enabled. The implementation of specific J2EE 1.3 features (EJB 2.0, JSP 1.2,
              Servlet 2.3, and J2EE Connector Architecture 1.0) in BEA WebLogic Server 6.1
              is of a non-final version of the appropriate specification. It is subject to
              change in future releases once the specification becomes finalized. This may
              cause application code developed for BEA WebLogic Server 6.1 that uses the
              new features of J2EE 1.3 to be incompatible with the J2EE 1.3 platform
              supported in future releases of BEA WebLogic Server.>
              ####<Dec 11, 2002 1:23:07 AM GMT> <Warning> <EJB> <QAAPP01> <Makalu> <main>
              <system> <> <010061> <The Message-Driven EJB: ASYNCMessageDrivenBean is
              unable to connect to the JMS destination: CQM_MessageQueue. The EJB
              container will automatically attempt to re-establish 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:
              Unable to create a JNDI InitialContext to lookup the JMS destination. The
              error was:
              javax.naming.CommunicationException. Root exception is
              java.net.ConnectException: t3://127.0.0.1:7001: Destination unreachable;
              nested exception is:
              java.net.ConnectException: Connection refused: connect; No available router
              to destination
              at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
              at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
              at
              weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
              textFactoryDelegate.java:307)
              at
              weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
              textFactoryDelegate.java:211)
              at
              weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
              ory.java:149)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:660)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
              at javax.naming.InitialContext.init(InitialContext.java:217)
              at javax.naming.InitialContext.<init>(InitialContext.java:193)
              at
              weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.getInitialContext(MessageD
              rivenBeanInfoImpl.java:641)
              at
              weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectio
              nPoller.java:474)
              at
              weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller
              .java:418)
              at
              weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling(JMSCon
              nectionPoller.java:286)
              at
              weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.deploy(MessageDrivenBeanIn
              foImpl.java:511)
              at weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1294)
              at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:996)
              at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
              at weblogic.j2ee.Application.addComponent(Application.java:170)
              at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
              arget.java:360)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
              Target.java:285)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
              eploymentTarget.java:239)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
              entTarget.java:199)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              .java:636)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
              21)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              nImpl.java:360)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
              at $Proxy34.updateDeployments(Unknown Source)
              at
              weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
              ServerMBean_CachingStub.java:2977)
              at
              weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
              icationManager.java:372)
              at
              weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
              r.java:160)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              .java:636)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
              21)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              nImpl.java:360)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
              at $Proxy49.start(Unknown Source)
              at
              weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
              ApplicationManagerMBean_CachingStub.java:480)
              at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
              at weblogic.management.Admin.finish(Admin.java:644)
              at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
              at weblogic.Server.main(Server.java:35)
              >
              ####<Dec 11, 2002 1:23:07 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
              <system> <> <010009> <EJB Deployed EJB with JNDI name
              ASYNCMessageDrivenBean.>
              

    Hi Tom
              Yes we do have an URL provided in the descriptor. It's
              t3://jms.server.net:7001.
              and the jms.server.net is resolved via a hosts file in Win2K
              eg,
              192.168.100.200 jms.server.net
              You are right in saying that the loopback in a dual-net card is a problem.
              But our solution
              above solves the issue as long as your host file does not use 127.0.0.1 as
              the IP.
              We need the URL b/c depending on our client's deployment , the JMS Server
              may be remote or may be local.
              "Tom Barnes" <[email protected]> wrote in message
              news:[email protected]...
              > Hi x,
              >
              > Something to do with the loopback and dual-network cards is
              > messin' with WLS' mind. I do not know what the problem is,
              > but I can guess:
              >
              > You have specified an URL in the MDB descriptor when there
              > is no need for one. If t3://127.0.0.1:7001 is in the same
              > cluster the MDB is running in (I suspect this URL is
              > actually the same WL server), then don't specify the URL.
              > This URL is only useful for connecting an MDB to a JMS
              > server that is outside local server and outside the cluster.
              > The URL may be working on single-network card systems
              > as perhaps then WL has enough info to guess that you
              > actually mean the local WL server, and simply converts
              > the context to a local context.
              >
              > Note that the URL option in the MDB descriptor is actually
              > a WebLogic extension of J2EE.
              >
              > Tom
              >
              >
              >
              > x wrote:
              > > Environment: WLS 6.1SP3 on Win2K SP2, non-clustered.
              > >
              > > I am getting some error (or perhaps warning) during deployment of
              Message
              > > Driven Bean. Any one seen this before?
              > > This error only comes on a machine with Dual Network card.
              > >
              > > Thanks.
              > >
              > >
              > >
              > > ####<Dec 11, 2002 1:23:04 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
              > > <system> <> <010008> <EJB Deploying file: AppRuntime.jar>
              > > ####<Dec 11, 2002 1:23:04 AM GMT> <Warning> <J2EE> <QAAPP01> <Makalu>
              <main>
              > > <system> <> <160007> <You are running WebLogic Server with J2EE 1.3
              features
              > > enabled. The implementation of specific J2EE 1.3 features (EJB 2.0, JSP
              1.2,
              > > Servlet 2.3, and J2EE Connector Architecture 1.0) in BEA WebLogic Server
              6.1
              > > is of a non-final version of the appropriate specification. It is
              subject to
              > > change in future releases once the specification becomes finalized. This
              may
              > > cause application code developed for BEA WebLogic Server 6.1 that uses
              the
              > > new features of J2EE 1.3 to be incompatible with the J2EE 1.3 platform
              > > supported in future releases of BEA WebLogic Server.>
              > > ####<Dec 11, 2002 1:23:07 AM GMT> <Warning> <EJB> <QAAPP01> <Makalu>
              <main>
              > > <system> <> <010061> <The Message-Driven EJB: ASYNCMessageDrivenBean is
              > > unable to connect to the JMS destination: CQM_MessageQueue. The EJB
              > > container will automatically attempt to re-establish 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:
              > > Unable to create a JNDI InitialContext to lookup the JMS destination.
              The
              > > error was:
              > > javax.naming.CommunicationException. Root exception is
              > > java.net.ConnectException: t3://127.0.0.1:7001: Destination unreachable;
              > > nested exception is:
              > > java.net.ConnectException: Connection refused: connect; No available
              router
              > > to destination
              > > at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
              > > at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
              > > at
              > >
              weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
              > > textFactoryDelegate.java:307)
              > > at
              > >
              weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
              > > textFactoryDelegate.java:211)
              > > at
              > >
              weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
              > > ory.java:149)
              > > at
              javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:660)
              > > at
              javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
              > > at javax.naming.InitialContext.init(InitialContext.java:217)
              > > at javax.naming.InitialContext.<init>(InitialContext.java:193)
              > > at
              > >
              weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.getInitialContext(MessageD
              > > rivenBeanInfoImpl.java:641)
              > > at
              > >
              weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectio
              > > nPoller.java:474)
              > > at
              > >
              weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller
              > > .java:418)
              > > at
              > >
              weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling(JMSCon
              > > nectionPoller.java:286)
              > > at
              > >
              weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.deploy(MessageDrivenBeanIn
              > > foImpl.java:511)
              > > at
              weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1294)
              > > at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:996)
              > > at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
              > > at weblogic.j2ee.Application.addComponent(Application.java:170)
              > > at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
              > > at
              > >
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
              > > arget.java:360)
              > > at
              > >
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
              > > Target.java:285)
              > > at
              > >
              weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
              > > eploymentTarget.java:239)
              > > at
              > >
              weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
              > > entTarget.java:199)
              > > at java.lang.reflect.Method.invoke(Native Method)
              > > at
              > >
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              > > .java:636)
              > > at
              > >
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
              > > 21)
              > > at
              > >
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              > > nImpl.java:360)
              > > at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
              > > at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
              > > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
              > > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
              > > at $Proxy34.updateDeployments(Unknown Source)
              > > at
              > >
              weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
              > > ServerMBean_CachingStub.java:2977)
              > > at
              > >
              weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
              > > icationManager.java:372)
              > > at
              > >
              weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
              > > r.java:160)
              > > at java.lang.reflect.Method.invoke(Native Method)
              > > at
              > >
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
              > > .java:636)
              > > at
              > >
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
              > > 21)
              > > at
              > >
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
              > > nImpl.java:360)
              > > at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
              > > at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
              > > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
              > > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
              > > at $Proxy49.start(Unknown Source)
              > > at
              > >
              weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
              > > ApplicationManagerMBean_CachingStub.java:480)
              > > at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
              > > at weblogic.management.Admin.finish(Admin.java:644)
              > > at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
              > > at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
              > > at weblogic.Server.main(Server.java:35)
              > >
              > > ####<Dec 11, 2002 1:23:07 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
              > > <system> <> <010009> <EJB Deployed EJB with JNDI name
              > > ASYNCMessageDrivenBean.>
              > >
              > >
              >
              

  • Message-driven bean questions

    Hello,
    i'm an Italian student trying to develop java applications in NetBeans IDE 6.1 with GlassFish V2, using Java EE 5; since I only recently approached java web programming, I have encountered some problems in using enterprise beans, especially message-driven ones: to get in touch with the stuff, I have created an enterprise application project in NetBeans with a plain message-driven bean and a servlet who sends a message to this bean, following an online netbeans tutorial.
    I'm using annotations to refer the resource in the servlet (the jms name I assigned the bean is "TestBean"):
    @Resource(mappedName="jms/TestBeanFactory")
    private ConnectionFactory connectionFactory;
    @Resource(mappedName="jms/TestBean")
    private Queue queue;I send the message by creating a connection, producing the message with a MessageProducer object, and sending it:
    Connection connection = connectionFactory.createConnection();
    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer messageProducer = session.createProducer(queue);
    TextMessage message = session.createTextMessage("This is a message.");
    messageProducer.send(message);
    messageProducer.close();
    connection.close();In the message-driven bean, I have my onMessage() method catching the message and writing to the system.out his text content:
    public void onMessage(Message message)
            TextMessage msg = null;
            try
                if (message instanceof TextMessage)
                    msg = (TextMessage) message;
                    String x = msg.getText();
                    System.out.println(x);
            catch (Exception e)
                e.printStackTrace();
                m_ctx.setRollbackOnly();
            catch (Throwable te)
                te.printStackTrace();
        }The message is sent and received, and the content printed. Ok, here are my questions:
    1) in the output window of netbeans I see the output but also an exception: "DirectConsumer:Caught Exception delivering messagecom.sun.messaging.jmq.io.Packet cannot be cast to com.sun.messaging.jms.ra.DirectPacket". What does that mean?
    2) I can't figure out how to make the bean answer this message to the servlet...and of course the servlet receive this response: in plain words, I would like to send back another message from the bean to the servlet, and process it. Can someone explain me how to do that?
    Thanks?

    1) in the output window of netbeans I see the output but also an exception: "DirectConsumer:Caught Exception delivering messagecom.sun.messaging.jmq.io.Packet cannot be cast to com.sun.messaging.jms.ra.DirectPacket". What does that mean?casting issue, but i don't know why.
    2) I can't figure out how to make the bean answer this message to the servlet...and of course the servlet receive this response: in plain words, I would like to send back another message from the bean to the servlet, and process it. Can someone explain me how to do that?a message driven bean cannot sent a response back. MDB is asynchronous. if you need to send a response back, you
    shouldn't be using an MDB. In that case, it sounds like you want a synchronous response. let a SLSB do it.
    %

  • Message driven bean: resource not created

    Hi,
    I'm having trouble deploying a simple test app that I've created (in App Server Platform Edition 8.0). It contains a servlet, that posts messages to a queue, and which appears to work fine. There is also a message-driven bean that receives these messages, but it will not deploy as is. I would be grateful for any assistance in working out why. Apologies if I'm missing something obvious, but the technology is quite new to me.
    I get the following error in the server log -
    [#|2004-07-14T14:03:49.640+0100|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=12;|EJB5090: Exception in creating EJB container [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : joeMDB]|#]
    [#|2004-07-14T14:03:49.656+0100|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=12;|appId=mdbtest moduleName=ejb-jar-ic_jar ejbName=joeMDB|#]
    [#|2004-07-14T14:03:49.656+0100|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.core.classloading|_ThreadID=12;|LDR5004: UnExpected error occured while creating ejb container
    com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : joeMDB
         at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:296)
         at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:232)
         at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:139)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:189)
    - which I can't find referenced in any other forum post. The relevant deployment descriptors are as follows -
    ejb-jar.xml -
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>mdbJar</display-name>
    <enterprise-beans>
    <message-driven>
    <ejb-name>joeMDB</ejb-name>
    <ejb-class>joeMDB</ejb-class>
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <transaction-type>Container</transaction-type>
    <message-destination-type>javax.jms.Queue</message-destination-type>
    <message-destination-link>jms/JoeDestQueue</message-destination-link>
    <message-destination-ref>
    <message-destination-ref-name>jmsJoeDestQueue</message-destination-ref-name>
    <message-destination-type>javax.jms.Queue</message-destination-type>
    <message-destination-usage>Consumes</message-destination-usage>
    <message-destination-link>jms/JoeDestQueue</message-destination-link>
    </message-destination-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>joeMDB</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>
    <message-destination>
    <message-destination-name>jms/JoeDestQueue</message-destination-name>
    </message-destination>
    </assembly-descriptor>
    </ejb-jar>
    sun-ejb-jar.xml -
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
    <sun-ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee">
    <enterprise-beans>
    <unique-id>0</unique-id>
    <ejb>
    <ejb-name>joeMDB</ejb-name>
    <jndi-name>joeMDB</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <mdb-connection-factory>
    <jndi-name>jms/joeFactory</jndi-name>
    </mdb-connection-factory>
    <jms-max-messages-load>1</jms-max-messages-load>
    <is-read-only-bean>false</is-read-only-bean>
    <refresh-period-in-seconds>-1</refresh-period-in-seconds>
    <cmt-timeout-in-seconds>0</cmt-timeout-in-seconds>
    <gen-classes/>
    <bean-pool>
    <steady-pool-size>-1</steady-pool-size>
    <resize-quantity>-1</resize-quantity>
    <max-pool-size>-1</max-pool-size>
    <pool-idle-timeout-in-seconds>-1</pool-idle-timeout-in-seconds>
    <max-wait-time-in-millis>-1</max-wait-time-in-millis>
    </bean-pool>
    </ejb>
    <message-destination>
    <message-destination-name>jms/JoeDestQueue</message-destination-name>
    <jndi-name>jms/JoeDestQueue</jndi-name>
    </message-destination>
    </enterprise-beans>
    </sun-ejb-jar>
    Thanks,
    Joe

    Hi, Joe,
    The message says that
    JMS resource not created : joeMDB
    The command to add the missing Queue:
    asadmin create-jms-resource user admin restype javax.jms.Queue JoeDestQueue
    Please note:
    in your sun-ejb-jar.xml, the real JNDI name for the Queue is JoeDestQueue.
    Double check the namings for the Queue in both ejb-jar.xml and sun-ejb-jar.xml.
    You only need two names for one Queue: one is for JNDI, one is for reference.
    _Dianne                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Message driven bean example is not working

    Hi,
    i tried message driven bean example on J2ee 6.20. I am able to make connection factory, but when i tried to deploy ear file a get an exception:
    Error occurred
    com.inqmy.services.deploy.container.DeploymentException: java.lang.NullPointerEx
    ception
            at com.inqmy.services.ejb20.EJBAdmin.commitDeploy(EJBAdmin.java:604)
            at com.inqmy.services.deploy.server.DeployServiceImpl.commit(DeployServi
    ceImpl.java:2897)
            at com.inqmy.services.deploy.server.DeployServiceImpl.deploy1(DeployServ
    iceImpl.java:524)
            at com.inqmy.services.deploy.server.DeployServiceImpl.deploy(DeployServi
    ceImpl.java:139)
            at com.inqmy.services.deploy.command.DeployCommand.exec(DeployCommand.ja
    va:142)
            at com.inqmy.services.shell.processor.environment.CommandBase.exec(Comma
    ndBase.java:124)
            at com.inqmy.services.shell.processor.Interpreter.applyLineCommand(Inter
    preter.java:391)
            at com.inqmy.services.shell.processor.Interpreter.apply(Interpreter.java
    :150)
            at com.inqmy.services.shell.processor.Shell.work(Shell.java:150)
            at com.inqmy.services.shell.processor.managers.ScriptProcessThread.run(S
    criptProcessThread.java:128)
    in visual administrator I can see the right queue and for few seconds this queue have one consumer.
    thank
    JJ

    Hi,
    but this example was in guide to this version.
    Ok, in case it is not possible to use MDB, how should i handle long time consumpting functions in EP enviroment?
    (customer has only EP6SP2 and he need to send a lot of mails after user request and i dont want to leave user waiting till that function ends. - should i start new thread in portal?)
    JJ

  • Jndi-name in  Message Driven Bean

    Hi
    I have successfully created the ejb jar file for deployment using sun one studio . I created the message driven bean and I right clicked on the ejb and used the customize option to set the bean properties . But my problem is that the jndi-name in the <ejb> tags takes the value jms/(ejbname) instead of jms/(queuename) . I am attaching the xml file with this . Can any one tell how to set the jndi-name to queue value using studio
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <name>ejb</name>
    <ejb>
    <ejb-name>Suneesh</ejb-name>
    <jndi-name>jms/Suneesh</jndi-name> <resource-ref>
    <res-ref-name>QueueConnectionFactory</res-ref-name>
    <jndi-name>jms/QueueConnectionFactory</jndi-name>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>TestQueue</resource-env-ref-name>
    <jndi-name>jms/TestQueue</jndi-name>
    </resource-env-ref>
    <pass-by-reference>false</pass-by-reference>
    </ejb>
    <ejb>
    <ejb-name>Suneesh1</ejb-name>
    <jndi-name>jms/Suneesh1</jndi-name>
    <resource-ref>
    <res-ref-name>QueueConnectionFactory</res-ref-name>
    <jndi-name>jms/QueueConnectionFactory</jndi-name>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>TestQueue1</resource-env-ref-name>
    <jndi-name>jms/TestQueue1</jndi-name>
    </resource-env-ref>
    <pass-by-reference>false</pass-by-reference>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>

    Hi Bhagya,
    Thanks for your response. I think from EJB container we can call Local EJBs with the full JNDI name. The session facade bean which is being called is a remote bean. From the session facade bean I am calling a local stateless session bean for database access. I am getting the reference of the local EJB from my session facade bean with full JNDI name "java:comp/env/ejb/EJBJNDIName". It is working fine with out any problem. My servicelocator is able to provide me the reference of the local EJB from the session facade remote bean with Full JNDI name. I am only having this problem calling from the MDB. I am really not sure whether what is causing it?
    Thanks
    Amit

  • Message-driven beans Vs JMS

    Hi,
    what does the bean technology add to the JSM by using the message driven beans instead of just using the regular asynchronus JMS?

    that's my question when and why should we chose:
    1. simple asynchronous JMS
    2. message-driven beansYou presumably mean:
    1. "simple" JMS client
    2. MDB JMS client
    That'll depend first on your existing architecture.You'll go for the second option if you're already using EJB , as to leverage your existing IT investment.
    Second, the EJB container gives you a number of services, so you don't have to worry about those yourself: life cycle management, scalability, transaction support, concurrency etc..
    With a plain JMS client, you'll have to handle concurrency yourself, for example, by spawning different JMS instances.
    If you're using an EJB container, that container will instantiate multiple MDB instances to handle multiple messages simultaneously.
    OTOH, The EJB contract implies some limitations of use. For example, an MDB can be associated with only one queue or topic. So if you need a JMS client to be able to handle multiple queues ot topics, you'll need to create multiple MDB clients, or go for a simple non-MDB JMS consumer.

  • How to transaction in the message driven bean?

              hello
              i write a message driven bean,that monitor the weblogic message queue,when a "Order"
              object is witten to the queue,the mdb get it and write it to a entity bean "Orderinfo".all
              of above logic is within the "onMessage" method of the mdb.
              i want to encapsulate the flow in a transaction,see my code snippet of the onMessage
              method:
              ObjectMessage objMsg = (ObjectMessage) msg;
              OrderVO orderVO = (OrderVO) objMsg.getObject();
              System.out.println(orderVO.booklist);
              OrderinfoHome orderinfoHome = (OrderinfoHome) ctx.lookup(
              "java:/comp/env/orderinfo");
              Orderinfo orderinfo = orderinfoHome.create(orderVO.orderID);
              orderinfo.setAddress(orderVO.address);
              orderinfo.setCustname(orderVO.custName);
              orderinfo.setEmail(orderVO.email);
              orderinfo.setBooklist(orderVO.booklist);
              orderinfo.setPrice(new BigDecimal(orderVO.price));
              and deploy descriptor snippet(ejb-jar.xml):
              <assembly-descriptor>
              <container-transaction>
              <method>
              <ejb-name>orderMDB</ejb-name>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              </assembly-descriptor>
              i think during this transaction,there are two action:geting the object from the
              queue and saving it to entity bean.in order to test the transaction,i modify the
              jndi name of entity bean in the code to a WRONG one.redeploy my program,and send
              a message to the queue,the mdb is activated,then the exception is thrown because
              of the wrong jndi name.after that,i check the message queue,find that it is empty.why?i
              think if the second action of the transaction is fail,the transaction should roll
              back,the message should be send BACK to the queue.
              i also ty to use the "javax.transaction.UserTransaction" in the onMessage method,but
              the follwing exception is thrown:
              javax.transaction.NotSupportedException: Another transaction is associated with
              this thread.................................
              who can help me,if any wrong with me,and how to use the transaction with the message
              driven bean?
              thank you.
              

    The transaction should rollback if the MDB throws an
              exception. Try changing your MDB code to
              call "setRollbackOnly()" on the EJB
              context (instead of throwing an exception) to see
              if that works. If calling "setRollbackOnly()" fixes
              the problem - then please contact customer support
              and report a bug.
              zbcong wrote:
              > hello
              >
              > i write a message driven bean,that monitor the weblogic message queue,when a "Order"
              > object is witten to the queue,the mdb get it and write it to a entity bean "Orderinfo".all
              > of above logic is within the "onMessage" method of the mdb.
              > i want to encapsulate the flow in a transaction,see my code snippet of the onMessage
              > method:
              >
              >
              > ObjectMessage objMsg = (ObjectMessage) msg;
              > OrderVO orderVO = (OrderVO) objMsg.getObject();
              > System.out.println(orderVO.booklist);
              > OrderinfoHome orderinfoHome = (OrderinfoHome) ctx.lookup(
              > "java:/comp/env/orderinfo");
              > Orderinfo orderinfo = orderinfoHome.create(orderVO.orderID);
              > orderinfo.setAddress(orderVO.address);
              > orderinfo.setCustname(orderVO.custName);
              > orderinfo.setEmail(orderVO.email);
              > orderinfo.setBooklist(orderVO.booklist);
              > orderinfo.setPrice(new BigDecimal(orderVO.price));
              >
              >
              > and deploy descriptor snippet(ejb-jar.xml):
              >
              >
              > <assembly-descriptor>
              > ............
              > ...........
              >
              > <container-transaction>
              > <method>
              > <ejb-name>orderMDB</ejb-name>
              > <method-name>*</method-name>
              > </method>
              > <trans-attribute>Required</trans-attribute>
              > </container-transaction>
              > </assembly-descriptor>
              >
              >
              > i think during this transaction,there are two action:geting the object from the
              > queue and saving it to entity bean.in order to test the transaction,i modify the
              > jndi name of entity bean in the code to a WRONG one.redeploy my program,and send
              > a message to the queue,the mdb is activated,then the exception is thrown because
              > of the wrong jndi name.after that,i check the message queue,find that it is empty.why?i
              > think if the second action of the transaction is fail,the transaction should roll
              > back,the message should be send BACK to the queue.
              >
              > i also ty to use the "javax.transaction.UserTransaction" in the onMessage method,but
              > the follwing exception is thrown:
              >
              > javax.transaction.NotSupportedException: Another transaction is associated with
              > this thread.................................
              >
              > who can help me,if any wrong with me,and how to use the transaction with the message
              > driven bean?
              >
              > thank you.
              >
              >
              

  • Message Driven Bean and transaction handling

    We are using container managed transactions with MDB's running on OC4J version 10.1.2. We have two database serveres, both running Oracle 10g.
    The MDB consume messages from the AQ-database through JMS (connected to a JDBC datasource registered as "jdbc/OracleAQDS").
    The MDB onMessage() code update the second database, using a JDBC datasource registered as "jdbc/OracleDBDS".
    We need atomic behaviour - if the MDB enforce a roll-back we want the updates aginst the second database to be rolled-back as well.
    (1) Should we use XA-datasources since AQ and DB runs on two different servers or do the OC4J container "magically" provide two-phase-commit for us?
    (2) If the MDB does a roll-back we would like to add an error record to a database table. Can we configure a third datasource and prevent if from beeing part of the container managed MDB roll-back?
    (3) When the MDB force a roll-back, is there some way for us to override the retry-delay in our Java code? If we catch certain errors during processing in onMessage we know that it is not necessary to retry for at least one hour (while less severe errors should be retried in just seconds).

    {color:#008000}Hi Friends,
    Thought of updating the answers for my questions in case somebody else would find it helpful.
    {color}
    {color:#999999}{color:#00ccff}I'm trying to make message driven bean and use the OnListener method.
    But since I'm doing this for the first time I have very limited knowledge.
    The following are my doubts :
    1. Should I have a main function while using the MDB?{color}
    {color:#008000} There is no need for any main function.{color}
    {color:#00ccff}2. Is it mandatory to have JNDI setup done?
    {color} {color}{color:#008000} There is no need for any JNDI setup done. But you need to configure the details on the
    Websphere by creating valid entries inside Resources namely -
    Queue Connection Factory, Queues and Listener Ports under the server.
    Thanks,
    Arun Prithviraj{color}

  • WebLogic 10 and EJB 3.0 for Message Driven Bean

    Hi,
    I am trying to deploy Message Driven Bean using EJB3.0 on weblogic 10. I am using annotations and don't want to use deployment descriptors.
    The Bean class:
    CalculatorBean.java
    import javax.ejb.*;
    import javax.jms.*;
    import java.sql.Timestamp;
    import java.util.StringTokenizer;
    @MessageDriven(activationConfig =
    @ActivationConfigProperty(propertyName="destinationType",
    propertyValue="javax.jms.Queue"),
    @ActivationConfigProperty(propertyName="destination",
    propertyValue="queue/mdb")
    public class CalculatorBean implements MessageListener {
    public void onMessage (Message msg) {
    TextMessage tmsg=null;
    try {
    if (msg instanceof TextMessage) {
    tmsg = (TextMessage) msg;
    System.out.println
    ("MESSAGE BEAN1: Message received: "
    + tmsg.getText());
    } else {
    System.out.println
    ("Message of wrong type1: "
    + msg.getClass().getName());
    catch (JMSException e) {
    e.printStackTrace();
    catch (Throwable te) {
    te.printStackTrace();
    My client:
    import javax.naming.*;
    import javax.naming.InitialContext;
    import java.text.*;
    import javax.jms.*;
    public class MsgClient {
    public static void main(String args[])
    QueueConnection cnn=null;
    QueueSender sender=null;
    QueueSession sess=null;
    Queue queue=null;
    try {
    java.util.Properties p = new java.util.Properties();
    p.put("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");
    p.put("java.naming.provider.url","t3://10.6.74.79:7001");
    Context ctx=new InitialContext(p);
    //InitialContext ctx=new InitialContext(p);
    queue = (Queue)ctx.lookup("queue/mdb");
    QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
    cnn = factory.createQueueConnection();
    sess= cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
    sender = sess.createSender(queue);
    TextMessage message = sess.createTextMessage();
    message.setText("This is message by Gurumurthy" );
    System.out.println("Sending message: " +message.getText());
    sender.send(message);
    sess.close();
    catch (Exception e)
    e.printStackTrace();
    I am compiling and creating jar file for this class. Then I am creating a .ear file for this.
    The meta-inf/application.xml contains the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
    <display-name>MDBWorking1</display-name>
    <description>Application description</description>
    <module>
    <ejb>MDBWorking1.jar</ejb>
    </module>
    </application>
    I don't want to use deployment descriptor (ejb-jar.xml or weblogic-ejb-jar-xml), because I want to utilize the annotation feature of EJB3.0
    So, after creating the .ear file for this, and try to deploy on weblogic 10, I get the following error:
    An error occurred during activation of changes, please see the log for details.
    Exception preparing module: EJBModule(MDBWorking1.jar) Unable to deploy EJB: CalculatorBean from MDBWorking1.jar: [EJB:011113]Error: The Message Driven Bean 'CalculatorBean(Application: MDBWorking1, EJBComponent: MDBWorking1.jar)', does not have a message destination configured. The message destination must be set using a message-destination-link, destination-resource-link, destination-jndi-name or a resource-adapter-jndi-name.
    Substituted for missing class [EJB - 11113]Error: The Message Driven Bean 'CalculatorBean(Application: MDBWorking1, EJBComponent: MDBWorking1.jar)', does not have a message destination configured. The message destination must be set using a message-destination-link, destination-resource-link, destination-jndi-name or a resource-adapter-jndi-name.
    How to solve this?
    Note:
    I don't want to use Deployment Descriptor and all I want to use is EJB3.0's annotation feature.
    Thanks,
    Guru

    Dear gurubbc,
    I don't know if it still matters to you but you can use the javax.ejb.MessageDriven annotation to point your bean on your queue. I had the same issue like you but i could not solve it properly by switchihg to weblogic.ejb.MessageDriven.
    Use the following annotation and it should work out:
    @MessageDriven
    (mappedName = "queue/mdb",
    name = "CalculatorBean",
    activationConfig = {
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    Here you can see that the mappedName is the JNDI name of the queue you are trying to connect to. The name is the name for your Bean, and the only property passed is the destination type.
    Hope this helps.
    Cheers,
    Istvan

  • Exception in setting up message-driven bean container: [MQJMS1010: not impl

    Problem
    =======
    We are trying to configure and deploy a Message Driven
    Bean to listen on a WebSphere MQ queue, using LDAP to
    share knowledge of the Queue & Connection Factory.
    But when we start the Sun One domain we get an exception:
    javax.jms.JMSException: MQJMS1010: not implemented
    (see log file at the end of this email)
    Can anybody help please ?
    The configuration of the various components are listed
    below:
    WebSphere MQ Configuration
    ==========================
    Version 5.3
    Queue Manager
    QM_Test
    Queues
    PATH_MFP.Case.Request           
         Queue Type:     Local
    Channels
    Channel_Test               
         Channel Type:     Server Connection
         Protocol Type:     TCP/IP
    LDAP configuration
    ==================
    ldap://localhost/o=mqtest
    cn=MFP_LOCAL_Factory
    javaFactory=com.ibm.mq.jms.MQQueueConnectionFactoryFactory
    javaClassName=com.ibm.mq.jms.MQQueueConnectionFactory
    javaReferenceAddress=#3#QMGR#QM_Test
    javaReferenceAddress=#6#CHAN#Channel_Test
    javaReferenceAddress=#14#TM#SYSTEM.DEFAULT.MODEL.QUEUE
    cn=MFP_LOCAL_Case_Request_Queue
    javaFactory=com.ibm.mq.jms.MQQueueFactory
    javaClassName=com.ibm.mq.jms.MQQueue
    javaReferenceAddress=#9#QU#PATH_MFP.Case.Request
    javaReferenceAddress=#10#QMGR#QM_Test
    EJB configuration
    =================
    ejb-jar.xml
         <message-driven>
    <display-name>ServerMessageDrivenBean</display-name>
    <ejb-name>ServerMessageDrivenBean</ejb-name>
         <ejb-class>nz.co.acc.emi.server.connector.mdb.ServerMessageDrivenBean</ejb-class>
         <transaction-type>Container</transaction-type>
    <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
         </message-driven>
    sun-ejb-jar.xml
    <ejb>
         <ejb-name>ServerMessageDrivenBean</ejb-name>
    <jndi-name>MFP_LOCAL_Case_Request_Queue</jndi-name>
         <mdb-connection-factory>
              <jndi-name>MFP_LOCAL_Factory</jndi-name>
         </mdb-connection-factory>
         </ejb>
    Sun One configuration
    =====================
    MFPProcessing: JNDI: External Resources
    MFP_LOCAL_Factory          Enabled javax.jms.QueueConnectionFactory
         JNDI Name:      MFP_LOCAL_Factory
         Resource Type:     javax.jms.QueueConnectionFactory
         JNDI Lookup:     cn=MFP_LOCAL_Factory
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
              java.naming.security.authentication     none
    MFP_LOCAL_Case_Request_Queue     Enabled javax.jms.Queue
         JNDI Name:      MFP_LOCAL_Case_Request_Queue
         Resource Type:     javax.jms.Queue
         JNDI Lookup:     cn=MFP_LOCAL_Case_Request_Queue
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
    server.xml
    <mdb-container steady-pool-size="10" pool-resize-quantity="2" max-pool-size="60" idle-timeout-in-seconds="600" monitoring-enabled="true" log-level="FINEST" />
    <jms-service port="1240" admin-user-name="admin" admin-password="admin" init-timeout-in-seconds="30" enabled="true" log-level="FINE" />
    Sun One log file
    ================
    server.log
    [01/Mar/2004:10:06:48] INFO ( 657): CORE1116: Sun ONE Application Server 7.0.0_01
    [01/Mar/2004:10:06:51] INFO ( 657): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_01] from [Sun Microsystems Inc.]
    [01/Mar/2004:10:07:09] INFO ( 657): JMS5023: JMS service successfully started. Instance Name = domain1_MFPProcessing, Home = [C:/Sun/AppServer7/imq/bin].
    [01/Mar/2004:10:07:13] INFO ( 657): JTS5014: Recoverable JTS instance, serverId = [100]
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5060: Install JDBC Datasources ...
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5059: Binding [JDBC DataSource Name: jdbc/MfsDataSourceJConn, Pool Name: MFSConnectionPool]
    [01/Mar/2004:10:07:15] INFO ( 657): JMS5015: Install JMS resources ...
    [01/Mar/2004:10:07:47] WARNING ( 657): [EntityContainer] Created EntityContainer....
    [01/Mar/2004:10:07:49] INFO ( 657): LDR5010: All ejb(s) of [mfs] loaded successfully!
    [01/Mar/2004:10:07:52] INFO ( 657): MDB00044: Deploying message-driven bean [emi:ServerMessageDrivenBean], consuming from [MFP_LOCAL_Case_Request_Queue]
    [01/Mar/2004:10:07:52] FINE ( 657): Messages delivery is part of a container-managed tx
    [01/Mar/2004:10:07:52] FINE ( 657): emi:ServerMessageDrivenBean:reconnect-delay-in-seconds=60, reconnect-max-retries=60, reconnect-enabled=true
    [01/Mar/2004:10:07:53] INFO ( 657): MDB00028: [emi:ServerMessageDrivenBean]: Message-driven bean container using external connection factory object: [com.ibm.mq.jms.MQQueueConnectionFactory]
    [01/Mar/2004:10:07:55] FINE ( 657): emi:ServerMessageDrivenBean: Setting message-driven bean pool max-pool-size=60, steady-pool-size=10, pool-resize-quantity=2, idle-timeout-in-seconds=600
    [01/Mar/2004:10:07:55] FINE ( 657): Initializing server session factory
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] INFO ( 657): MDB0001: Create message-driven bean pool with maximum pool size [60], bean idle timeout [600] seconds
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00030: [emi:ServerMessageDrivenBean]: Exception in setting up message-driven bean container: [MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINE ( 657): MDB00018: [emi:ServerMessageDrivenBean]: Closing message-driven bean container connection
    [01/Mar/2004:10:07:55] WARNING ( 657): [AbstractPool]: Cancelled pool timer task at: Mon Mar 01 10:07:55 NZDT 2004
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00017: [ServerMessageDrivenBean]: Exception in creating message-driven bean container: [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): javax.jms.JMSException
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] SEVERE ( 657): EJB5090: Exception in creating EJB container [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] SEVERE ( 657): appId=emi moduleName=emiEjb_jar ejbName=ServerMessageDrivenBean
    [01/Mar/2004:10:07:55] SEVERE ( 657): LDR5004: UnExpected error occured while creating ejb container
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] WARNING ( 657): CORE5021: Application NOT loaded: [emi]
    [01/Mar/2004:10:07:55] INFO ( 657): WEB0100: Loading web module [mfs:mfs.war] in virtual server [MFPProcessing] at [mfs]
    [01/Mar/2004:10:08:31] INFO ( 657): HTTP3072: HTTP listener http-listener-1 [http://ch042dysz0405:1080] ready to accept requests
    [01/Mar/2004:10:08:31] INFO ( 657): CORE3274: successful server startup
    [01/Mar/2004:10:08:33] INFO ( 657): CORE5053: Application onReady complete.

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

  • Exception in setting up message-driven bean container

    hello,
    I'm trying to deploy a single mdb and I'm getting an exception. I've tried closely following the way things are done with the mdb example in the samples AppServer7 directory. Am I missing something in one of my deployment descriptior files?
    Thanks,
    Robert
    [17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00030: [mdb2-simpleEjb:MessageProcessorBean]: Exception in setting up message-driven bean container: [[C4060]: Login failed.]
    [17/Apr/2003:12:18:24] FINE ( 1832): MDB00018: [mdb2-simpleEjb:MessageProcessorBean]: Closing message-driven bean container connection
    [17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00017: [MessageProcessorBean]: Exception in creating message-driven bean container: [javax.jms.JMSSecurityException: [C4060]: Login failed.]
    [17/Apr/2003:12:18:24] SEVERE ( 1832): javax.jms.JMSSecurityException
    javax.jms.JMSSecurityException: [C4060]: Login failed.
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:682)
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:615)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:238)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1512)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

Maybe you are looking for