You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Vegi, Vamsi (MAN-Corporate-CON)" <Va...@Manheim.com> on 2013/06/11 21:33:55 UTC

How do I pass the user and and password to the camle JMS component - also why does not the JMS component not throw exception

Hello

I am executing the camel using Java DSL, here it is ( I am trying to upload a local file to JMS)


public void prepare() throws Exception {
LOGGER.info("----------------- in prepare -----------------------");
devConnFactory = new com.tibco.tibjms.TibjmsConnectionFactory("tcp://tx-emsdev01.vm.man.lab:7222");
context = new DefaultCamelContext();
context.addComponent("dev-jms", JmsComponent.jmsComponentAutoAcknowledge(devConnFactory));
context.addRoutes(new RouteBuilder() {
                public void configure() {
                                from("file:" + inDir + "?noop=true")
                                .routeId("JunitRoutId")
                                .log(LoggingLevel.INFO, "*************************READING INPUT FILE*****************************${header.CamelFileName}")
                                .to("file:" + outDir + "?autoCreate=false")
                                .setHeader("MSG_TYPE", constant("COMP"))
                                .setHeader("MSG_SOURCE", constant("VIK"))
                                .to("dev-jms:queue:man.tibco.dev.ovc.company.inbound.queue" + "?testConnectionOnStartup=true&password=admin&username=admin")
                                .log(LoggingLevel.INFO, "*************************UPLOADED INPUT FILE*****************************${header.CamelFileName}")
                                ;
                }
});

context.start();
Thread.sleep(5000);
context.stop();

I know, there is no errors on the file components, the log file shows right file name

now... there is never an exception and the queue does not have the msg
Question 1: when I purposefully give a wrong queue name, it does not throw exeception
Question 2: testConnectionOnStartup is set to true, but still no execption
Question 3: I am passing '&' to send multiple option, is that allowed.


-thank you