• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Probelem with MDB l(on weblogic 7.0) listening to MQ (Start-up class issue )

Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
I am supposed to write a Message driven bean that would reside on Weblogic7.0 and listen to a particular queue of IBM MQ.
I understand that we need to write a Start-up class for this. I have written the start-up class but I am getting the following error:
<Apr 16, 2003 3:17:14 PM EDT> <Warning> <EJB> <010061> <The Message-Driven EJB: SimpleMDB is unable
to connect to the JMS destination: ivtQ. The EJB container will automatically attempt to re-establis
h the connection with the JMS server. This warning may occur during WebLogic Cluster start-up if the
JMS destination is located on another server. When the JMS server connection is re-established, the
Message-Driven EJB will again receive JMS messages.
The Error was:
The JMS destination with the JNDI name: ivtQ could not be found. Please ensure that the JNDI name in
the weblogic-ejb-jar.xml is correct, and the JMS destination has been deployed.>
I understand that there are some configuration issues:
Can you please guide where am I going wrong:
1.What should be the value of the <destination-jndi-name> in the Weblogic-ejb-jar. I have not passed any Queue name through the start-up class …Is it ok?
2.Then what queue name should I specify. (ofcousrse it should be the MQ queue name but do I need to add that in the JNDI or in the weblogic console…?
3.Please confirm that the <connection-factory-jndi-name> mentioned in the weblogic-ejb-jar.xml should be the same as what I am passing as JNDIName (through weblogic console).
4.Kindly advice if I am missing anything (especially in my start-ip class)
Here are my Deployemnt descriptors:
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd">
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<!-- In WebLogic Server 6.0, this next parameter is named "jms-destination-type" -->

My Start-up class is as follows:
import com.ibm.mq.jms.*;
import java.util.*;
import javax.jms.*;
import javax.naming.*;
import weblogic.common.*;

public class MQJMSStartup implements T3StartupDef
/** * The name of the queue manager to connect to. The startup class * will throw an exception if this parameter is not set. */
public final static String QM_NAME_PROPERTY = "QManager";

/** * The host name where the queue manager runs. If not set, the * startup class will create a "bindings mode" connection to a * queue manager on the local host. */
public final static String QM_HOST_PROPERTY = "QManagerHost";

/** * The port number where the queue manager listens. If not set, this * defaults to 1414, the default MQSeries port */
public final static String QM_PORT_PROPERTY = "QManagerPort";

/** * The name in JNDI to store this queue manager object under. * If not set, the startup class will throw an exception. */
public static final String JNDI_NAME_PROPERTY = "JNDIName";
// Required
public MQJMSStartup()
// Required, but not needed
public void setServices(T3ServicesDef services)
public String startup(String name, Hashtable args) throws Exception
String qmName = (String)args.get(QM_NAME_PROPERTY);
System.out.println("*****The qmName is "+qmName);
if (qmName == null)
throw new Exception("Startup parameter " + QM_NAME_PROPERTY + " must be set");
String jndiName = (String)args.get(JNDI_NAME_PROPERTY);
System.out.println("***The JNDI Nname is "+jndiName);
if (jndiName == null)
throw new Exception("Startup parameter " + JNDI_NAME_PROPERTY + " must be set");
String qmHost = (String)args.get(QM_HOST_PROPERTY);
System.out.println("*****The qmHost is "+qmHost);
String qmPort = (String)args.get(QM_PORT_PROPERTY);
System.out.println("*****The qmPort is "+qmPort);
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
if (qmHost == null)
if (qmPort != null)
int portNum = Integer.parseInt(qmPort);
catch (NumberFormatException ignore)
InitialContext context = new InitialContext();
context.bind(jndiName, factory);
StringBuffer buf = new StringBuffer();
buf.append( "A connection factory was created for the MQ Queue Manager ");
buf.append(" and stored in JNDI at ");
System.out.println("*****The mqstartup is executed succesfully"+buf.toString());
return buf.toString();

The args that I pass through the weblogic console is as follows:
QManager=QM_mphasis_eight, JNDIName=MyQCF

Thanks and regards,
Milan Doshi
Doshi Milan
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,
Can someone guide me how to register the queue in Weblogic JNDI. (this is with reference to my above probelem),
Thanks in advance,
Milan Doshi
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are details on Bea's website at ftp://edownload:BUY_ME@ftpna2.bea.com/pub/downloads/jmsproviders.pdf with details on how to integrate a WLS MDB with a foreign JMS provider which might give you some tips.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic