[jboss-user] [JBoss Messaging Users] - Re: Easiest way to bind IBM WS MQ hosted 'Queue' to name in

ben.cotton@rutgers.edu do-not-reply at jboss.com
Mon Sep 21 12:56:09 EDT 2009


Thanks for your reply gaohoward.

I modified the code as you indicated:

  |                      Properties props = new Properties();
  | 			props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); 
  | 			props.setProperty(Context.PROVIDER_URL,"jnp://10.4.164.105:11099");  
  | 			
  | 			
  | 			
  | 			props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
  | 	
  | 			
  | 			Context ctx = new InitialContext(props);
  | 
  | 			
  | 			ConnectionFactory factory = (ConnectionFactory)ctx.lookup("IVTCF");
  | 			
  | 			System.out.println("looked up 'IVTCF' javax.jms.ConnectionFactory established! 'factory'=["+
  | 					factory+
  | 					"]");
  | 			
  | 			

But I still only get 'factory' values == NULL after executing the lookup().

Via the JBoss admin console, I checked the value for 'IVTCF' in the JNDI global namespace and it shows a correct and expected value.


Global JNDI Namespace
  | 
  |   
  |   +- IVTCF (class: com.ibm.mq.connector.outbound.ConnectionFactoryImpl)
  | 



I guess in the worst case, I could code this Producer to directly invoke the WS MQ implementation of com.ibm.msg.client.jms.JmsConnectionFactory, but I was hoping I could just deploy the WS MQ JCA Resource adapter to my JBoss instance, config a Resource-->ConnectionFactory via the JBoss admin console, and then just do a 'lookup' on that ConnFactory to have all the plumbing (from JBoss to WS MQ) done for me transparently (via JCA).

Hoping to avoid coding directly to com.ibm.msg.client.jms.* API, do you have any other ideas/recommendations on how I might be able to get this to work via JBoss/JCA?

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

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



More information about the jboss-user mailing list