camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Queen <Jason.Qu...@colinx.com>
Subject Websphere MQ setting targetClient=1
Date Wed, 10 Mar 2010 23:17:33 GMT

With camel 1.6.1 I'm trying to set the targetClient=1 for a queue connection.  
Here is the code im using to try to accomplish this but it doesnt work:

	MQQueueConnectionFactory cf = new MQQueueConnectionFactory();
       
        JmsConfiguration jc = new JmsConfiguration(cf);
       
        cf.setHostName("server");
        cf.setPort( 1415);
        cf.setQueueManager( "queueManager");
        cf.setChannel("channel");
        cf.setTransportType(1);

        JmsTransactionManager102 jtm = new JmsTransactionManager102(cf,
false);
       
        JmsComponent ibmmq = new JmsComponent(jc);
               
        ibmmq.setAcknowledgementModeName("AUTO_ACKNOWLEDGE");        
        ibmmq.setUseVersion102(true);
        ibmmq.setTransacted(true);
        ibmmq.setTransactionManager(jtm);
       
        CamelContext camel = new DefaultCamelContext();        
        
        Map props = new HashMap();
 	props.put("targetClient", 1);
 	camel.setProperties(props);
        
        camel.addComponent("ibmmq", ibmmq);
               
        camel.addRoutes( new RouteBuilder() {
                     public void configure() {
                        from("file://C:/cameltest").to("ibmmq:TEST.QUEUE");
                     }
        });
                               
        camel.start(); 

I assume this isn't the correct way to do this.  Does anyone have an example
of getting it to work with version 1.6.1?

-- 
View this message in context: http://old.nabble.com/Websphere-MQ-setting-targetClient%3D1-tp27857263p27857263.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message