[jboss-user] [JNDI/Naming/Network] - ConnectionFactory lookup returns null

juleroy do-not-reply at jboss.com
Thu Mar 6 09:42:46 EST 2008

Hi all,

I'm having a problem doing a lookup in a QueueConnectionFactory from a remote client application.
The jndi name is found but the lookup method always returns null.
I'm using JBoss 4.2.2GA, integrating with WebsphereMQ 6.0.

Here's the part of my code:

  | Properties prop = new Properties();
  | 			prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
  | 			prop.put(Context.PROVIDER_URL, "jnp://localhost:1099");
  | 			prop.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
  | 			ctx = new InitialContext(prop);
  | 		    qcf = (QueueConnectionFactory)ctx.lookup("jms/sadsxp/QCF");
  | 		    if (qcf == null)
  | 		    	System.out.println("null");
  | 		    connection = qcf.createQueueConnection();

The message "null" is always displayed.

Thanks for the attention,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134578#4134578

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134578

More information about the jboss-user mailing list