I found the answer....

I had to create a method that returned the jmscomponent and annotate it with
@Bean. @Bean annotation is a synonym for the </Bean> in camel-context.xml

The name of the method is the bean name, which I used in my routes to
communicate with the queues.

listed as below, this will register a component by name "wmq". I referenced
this id in my route as listed below

from("file:src/data?noop=true").to("*wmq:QName*").log("writting to Queue is
complete");

@Bean
        JmsComponent wmq() {
                JmsComponent jmsComp = new JmsComponent();
                try {

                        MQQueueConnectionFactory jmsConF = new 
MQQueueConnectionFactory();
                        jmsConF.setHostName("<>");
                        jmsConF.setQueueManager("<>");
                        jmsConF.setPort(<>);
                        jmsConF.setChannel("<>");
                        jmsConF.setTransportType(<>);

                        JmsTransactionManager trsnMgr = new 
JmsTransactionManager(jmsConF);

                        jmsComp.setConnectionFactory(jmsConF);
                        jmsComp.setTransactionManager(trsnMgr);
                        jmsComp.setTransacted(true);
                } catch (Exception e) {
                        e.printStackTrace();
                }

                return jmsComp;
        }



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Spring-Boot-Adding-JmsComponent-for-WMQ-to-Camel-Context-tp5777593p5777596.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to