Re: Camel Unit Test Cases - Using TestNG

2015-10-20 Thread contactreji
Hey all As of now, I have a route created using RouteBuilder API in my below test class. I was kinda wondering if I can start routes defined in camel-context.xml file in the project class path. What if I wanna unit test the routes in camel-context.xml file. Is there a way I can modify my below

Re: Camel Unit Test Cases - Using TestNG

2015-10-20 Thread Claus Ibsen
Ah sorry I was to fast, there is a CamelSpringTestSupport in camel-testng you can use. See how it test itself in its own unit tests of camel-testng On Tue, Oct 20, 2015 at 9:34 AM, Claus Ibsen wrote: > If camel-context.xml is a spring xml file, then you must use >

Re: Camel Unit Test Cases - Using TestNG

2015-10-20 Thread contactreji
Thanks Claus. It worked :-) . The import package statement was the culprit. I replaced it with import org.apache.camel.testng.CamelTestSupport; Cheers -Reji - Reji Mathews Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB ) LinkedIn

Re: Camel Unit Test Cases - Using TestNG

2015-10-20 Thread Claus Ibsen
If camel-context.xml is a spring xml file, then you must use camel-test-spring for unit testing On Tue, Oct 20, 2015 at 9:17 AM, contactreji wrote: > Hey all > > As of now, I have a route created using RouteBuilder API in my below test > class. > > I was kinda wondering if

camel-JMS Component Responses from multiple queues

2015-10-20 Thread ravi.4indra
Hi, I am looking for some suggestions on scenario where response to a request sent to queue can come in any one of the three queues. is there a way in camel to check for responses in multiple queues. Thanks ravi -- View this message in context:

Re: camel-JMS Component Responses from multiple queues

2015-10-20 Thread Claus Ibsen
No that is not possible. camel-jms is for listening to one JMS destination. But some brokers allow to do composite queues such as ActiveMQ http://activemq.apache.org/virtual-destinations.html where you can define this on the broker level, so N+ queues can appear as 1 JMS destination. On Tue,

Re: Camel Unit Test Cases - Using TestNG

2015-10-20 Thread Claus Ibsen
> import org.apache.camel.test.junit4.CamelTestSupport; If you want to use tesgng you should use the camel-testng module, and not the junit based. On Tue, Oct 20, 2015 at 6:33 AM, contactreji wrote: > Hello friends > > I am trying to write a unit test suite for my camel

Handle Mail exception

2015-10-20 Thread zied123456
I want to write the excpetion in a file : *This is the route:* this is what i set in *myExceptionHandler class:* public class MyExceptionHandler implements ExceptionHandler { private ProducerTemplate template; public void *handleException*(String message,Throwable

Re: ProducerTemplate creates too much threads

2015-10-20 Thread Claus Ibsen
You can use the addService api on CamelContext - see its javadoc On Tue, Oct 20, 2015 at 1:55 PM, Shylendran C wrote: > Thanks for your reply. > So, just want to confirm - no need to put the start() and stop() for each > thread, is that correct? > And, our application

Re: ProducerTemplate creates too much threads

2015-10-20 Thread Shylendran C
Thanks for your reply. So, just want to confirm - no need to put the start() and stop() for each thread, is that correct? And, our application will be running for ever (untill we manually kill the process), so I am not sure where to put the stop() method. Any suggestions? Thanks again,

Re: Netty for TCP communication

2015-10-20 Thread M, Denashkumar
Hi, I am using netty to send a request over a TCP socket. When I send the request I need to send 4 bytes length of the message and then followed by an XML payload. On response I am getting 4 bytes length and then XML payload. Now I wrote a client code to connect the camel route and sending

Re: ProducerTemplate creates too much threads

2015-10-20 Thread Claus Ibsen
Dont start / stop it all the time, create it once and reuse it, and stop it when you stop your app. On Tue, Oct 20, 2015 at 6:17 AM, shylendran.c wrote: > Hi, > I am using camel-code-2.15.2.jar. I have a multi-threaded application where > I have to send message

Re: Handle Mail exception

2015-10-20 Thread Claus Ibsen
Your produce template is very likely null On Tue, Oct 20, 2015 at 4:03 PM, zied123456 wrote: > I want to write the excpetion in a file : > > *This is the route:* > > class="com.ngtrend.readmail2.MyExceptionHandler"/> > > > > > > this is what i set in *myExceptionHandler

Re: Handle Mail exception

2015-10-20 Thread Claus Ibsen
Yes *template* is null, you need to create the template one time before you can use it. Also a good idea during coding is to run and debug the code, and set a breakpoint. On Tue, Oct 20, 2015 at 4:26 PM, zied123456 wrote: > Also with only : > > public void

File to JMS queue not working

2015-10-20 Thread Ishada
{ CamelContext context = new DefaultCamelContext(); ConnectionFactory connectionFactory = new ActiveMQConnectionFactory( "tcp://localhost:61616"); context.addComponent("jms",

Re: Handle Mail exception

2015-10-20 Thread zied123456
Also with only : public void handleException(final String message, final Exchange originalExchange, final Throwable exception) { template.sendBody("file://mail?fileName=mailtext3.txt", "Cannot connect:" +exception); } } it doesn't work. --

Re: Camel tracer logs in hawtio

2015-10-20 Thread Karts
Thank you! I can confirm it works very well -- View this message in context: http://camel.465427.n5.nabble.com/Camel-tracer-logs-in-hawtio-tp5772869p5772917.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel tracer logs in hawtio

2015-10-20 Thread Claus Ibsen
Yes as then its the same jvm that host the same app and you are in better control of the logging. You can then add that log4j-insight mbean that is needed. See here how ActiveMQ does it https://github.com/apache/activemq/blob/master/assembly/src/release/conf/activemq.xml#L32 On Tue, Oct 20, 2015

RE: [camel-cxf] using blueprint

2015-10-20 Thread Steve Huston
> I cannot find any examples for setting up camel-cxf using blueprint, can > someone point me the right direction? > The one I have found uses spring, is there a way to not use spring for this > component? This is a stripped down blueprint XML file that works. If I stripped too much and it

[camel-cxf] using blueprint

2015-10-20 Thread Pratt, Jason
I cannot find any examples for setting up camel-cxf using blueprint, can someone point me the right direction? The one I have found uses spring, is there a way to not use spring for this component?

Re: Camel tracer logs in hawtio

2015-10-20 Thread Karts
Would it work if we run Camel as a standalone app with hawtio embedded? It should be possible for us to switch to this. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-tracer-logs-in-hawtio-tp5772869p5772910.html Sent from the Camel - Users mailing list archive at

Re: Exchanges body and properites are not collected if it contains reference object which lead to memory leak

2015-10-20 Thread Darwish
Any help please ? - Othman Darwish ProgressSoft Corp. -- View this message in context: http://camel.465427.n5.nabble.com/Exchanges-body-and-properites-are-not-collected-if-it-contains-reference-object-which-lead-to-memoryk-tp5772861p5772922.html Sent from the Camel - Users mailing list

Re: File to JMS queue not working

2015-10-20 Thread yogu13
Hi, Do you see anything comming up on logs ? if yes please share that. Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/File-to-JMS-queue-not-working-tp5772904p5772923.html Sent from the Camel - Users mailing list archive at Nabble.com.