camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vegi, Vamsi (MAN-Corporate-CON)" <Vamsi.V...@Manheim.com>
Subject How do I pass the user and and password to the camle JMS component - also why does not the JMS component not throw exception
Date Tue, 11 Jun 2013 19:33:55 GMT
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




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message