Re: onException convertions to soapFault

2013-11-08 Thread Claus Ibsen
You can turn on handleFault on the route, then any exception thrown will become a fault message. On Thu, Nov 7, 2013 at 11:26 AM, Delanghe Stefaan stefaan.delan...@c4j.be wrote: Hey, First i am new to Camel. Hope not for long. :) A question regarding the exception arise for my current

Re: Factoring out exception Handling fragments.

2013-11-08 Thread Claus Ibsen
You can have a abstract base route builder class where you have shared onException and whatnot. And then just call super.configure() in your route classes On Thu, Nov 7, 2013 at 10:20 PM, kraythe . kray...@gmail.com wrote: Greetings, I have the following exception handling code on every route

Re: Jetty proxy Rest service fails for file uploading

2013-11-08 Thread berdoni
I have enabled DEBUG logging. Here it the full stack trace: 10:25:53,974 | DEBUG | heckpoint Worker | MessageDatabase | 78 - org.apache.activemq.activemq-core - 5.7.0 | Checkpoint started. 10:25:53,977 | DEBUG | heckpoint Worker | MessageDatabase | 78 -

Camel routing issue

2013-11-08 Thread sumitshining
I have created some routes. Following is the code which is having issues. Following is the expected behavior: Exchange at first gets processed at hourlyFeedParts queue and then passed to dailyProcessor. In dailyProcessor a property currHour is being checked if it is 23 or not. If not, it just

Re: Jetty proxy Rest service fails for file uploading

2013-11-08 Thread Willem jiang
It’s hard to tell the cause of IndexOutOfBoundsException. (https://issues.apache.org/jira/browse/CAMEL-6943)What’s your quest message look like? Did you just submit POST request with a Form to the Proxy? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog:

Re: write servlet response body in subsequent route

2013-11-08 Thread Claus Ibsen
Hi That is possible. The servlet component writes the response message from what the message contains, when the routing is done. But mind about using getOut. See this FAQ http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html On Thu, Nov 7, 2013 at 2:15 PM, Christian Schaefer

Re: OnCompletion issue in Camel-ActiveMQ

2013-11-08 Thread Claus Ibsen
onCompletion is per message. If you route from a JMS queue then its also per message, and there is no easy way of knowing that the queue is empty. You would need to think about alternative way of figuring out if the queue is empty. Depending on the message broker you use, they may have some API

Re: Propose add annotation @BeanInject

2013-11-08 Thread Claus Ibsen
There is blueprint annotations. Though not sure how mature that is. http://aries.apache.org/modules/blueprintannotation.html On Thu, Nov 7, 2013 at 2:19 PM, alexey-s alex...@mail.ru wrote: It's no secret that the OSGI Blueprint implements a proxy object for the service. In the old

Re: Performance impact of using streamCache=true in a route

2013-11-08 Thread Claus Ibsen
I guess only when the original stream is cached there may be a need for more memory when the conversion undergoes. Though from that point onwards you only keep one representation of the data in-memory. Its just a CachedStream from Camel instead of InputStream. Mind that Camel will overflow big

Re: Question About JNDI Registry when Running Camel in JBoss Application Server

2013-11-08 Thread Claus Ibsen
You can create the InitialContext the standard JEE way and have it integrate with the JBoss AS. Not sure how you do that, but in old days, it was all that initial context factory and hashtable options you needed to configure. Also you can have a jndi.properties in the root classpath that has

Re: Camel 2.12.1, Spring Framework 3.2.3, Jboss 6.0.0 Deployment Problem

2013-11-08 Thread Claus Ibsen
Yeah Usually with a WAR all the stuff you put in WEB-INF/lib is isolated. Not sure if you have some common spring JARs in JBoss that is reused. Maybe there is an option you can tell JBoss if it should use WEB-INF/lib before any common JARs. I know some other JEE servers has such options. On

Re: Transacted routes without using spring route builder?

2013-11-08 Thread Claus Ibsen
We have some JIRA tickets to introduce a transaction api in Camel, so you can use that API instead of the Spring TX api. And therefore be able to configure and setup TX with Camel without the Spring. Though we haven't implemented that yet. On Wed, Nov 6, 2013 at 5:11 PM, kraythe .

Re: Cannot create endpoint with camel printer component

2013-11-08 Thread Claus Ibsen
Hi What version of Camel do you use? And are you using Windows OS or some other OS? And what do you type in the Camel endpoint for the printer? Maybe show a bit of the Camel route code. On Tue, Nov 5, 2013 at 2:46 PM, berdoni berd...@gmail.com wrote: I have tested several lpr uri schemas but

Re: camel exception - netty

2013-11-08 Thread Claus Ibsen
What version of Camel do you use? And can you show the stacktrace. On Tue, Nov 5, 2013 at 12:41 PM, kiranreddykasa kirankuma...@fss.co.in wrote: Hi While using camel-netty we have noticed that when remote sever is down netty component is throwing org.apache.camel.CamelException. It

Re: Adding end point details to Camel logs

2013-11-08 Thread Claus Ibsen
Hi No you cannot do this. On Mon, Nov 4, 2013 at 6:38 PM, deepak_a angesh...@gmail.com wrote: All, My camel logs look like this INFO Route: route_simulatorMICS started and consuming from: Endpoint[file:///opt/share/EventFileInput?move=.event-done] INFO Route: SendToSDR started and

Re: camel exception - netty

2013-11-08 Thread kiranreddykasa
camel version : 2.12.1 Stacktrace : INFO 08 Nov 2013 15:20:08,767 org.apache.camel.main.MainSupport - Apache Camel 2.12.1 starting INFO 08 Nov 2013 15:20:09,001 org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.12.1 (CamelContext: camel-1) is starting INFO 08 Nov 2013 15:20:09,001

Re: Camel 2.12.1, Spring Framework 3.2.3, Jboss 6.0.0 Deployment Problem

2013-11-08 Thread gquintana
As far as I remember, there was something like this (in jboss-web.xml) to isolate your WebApp classes: Gérald -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-12-1-Spring-Framework-3-2-3-Jboss-6-0-0-Deployment-Problem-tp5742612p5742825.html Sent from the Camel -

Re: OnCompletion issue in Camel-ActiveMQ

2013-11-08 Thread jay
Hi, Thanks a lot for your views. i will try to look into the Camel route timing option. Have a good weekend. -- View this message in context: http://camel.465427.n5.nabble.com/OnCompletion-issue-in-Camel-ActiveMQ-tp5742771p5742824.html Sent from the Camel - Users mailing list archive at

Re: camel exception - netty

2013-11-08 Thread Claus Ibsen
Hi Yeah we can change that exception to connect exception. https://issues.apache.org/jira/browse/CAMEL-6946 On Fri, Nov 8, 2013 at 10:52 AM, kiranreddykasa kirankuma...@fss.co.in wrote: camel version : 2.12.1 Stacktrace : INFO 08 Nov 2013 15:20:08,767 org.apache.camel.main.MainSupport -

Is this a valid Camel endpoint URI: 'http://example.com/hello%3Fworld/'?

2013-11-08 Thread pmcb55
Hi, Using Camel 2.11.0, if I try this: * from(direct:test).to(http4://example.com/hello%3Fworld/);* ...Camel URLDecodes this URI to instead invoke on: *http4://www.example.com/service/hello?world/*, which HTTP then interprets as a URI having a query parameter of 'world/'. This is very

SJMS failure with stale reply queue

2013-11-08 Thread Harald Wellmann
I'm using Camel 2.12.1 with SJMS on JBoss AS 7.2.0 with the ActiveMQ 5.7.0 resource adapter and an external broker. My application has a route consuming request-reply messages from an ActiveMQ queue via SJMS. The connection factory is obtained from JBoss via @Resource injection. When I stop my

Is there a way to send a message when I am terminating?

2013-11-08 Thread pmp.martins
Hello all, I have a simply camel MINA server using the JAVA DSL, and I am running like the example documented here: http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html http://camel.apache.org/mina2.html Currently this server receives reports from a queue, updates them,

Re: SJMS failure with stale reply queue

2013-11-08 Thread Raul Kripalani
If these are request-reply interactions, producers should set a Time To Live when sending a message to the queue. The broker will then expire stale messages automatically and they won't be delivered to the consumer, thus reducing the risk of the consumer sending out unexpected replies like this

Throttling load balancer

2013-11-08 Thread Henryk Konsek
Hi guys, I've been asked about interesting Camel case and I don't know the answer :) . The problem that friend of mine is trying to address is that he wants to send messages to persistent store A, but if we hit the throttling limit, then he wants to send messages above the limit to message store

Re: SJMS failure with stale reply queue

2013-11-08 Thread Harald Wellmann
That might help in some cases, but I don't see how it solves the problem, when the producer dies before the message TTL is over. Regards, Harald 2013/11/8 Raul Kripalani r...@evosent.com If these are request-reply interactions, producers should set a Time To Live when sending a message to

Re: camel exception - netty

2013-11-08 Thread kiranreddykasa
Thanks - Regards kiran Reddy -- View this message in context: http://camel.465427.n5.nabble.com/camel-exception-netty-tp5742647p5742839.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty proxy Rest service fails for file uploading

2013-11-08 Thread berdoni
Hi Willem, I just perform a POST request from the JMeter. The request is simple and the message is the following: POST http://127.0.0.1:8081/my-app/ce/saveDocument POST data:

Re: Is there a way to send a message when I am terminating?

2013-11-08 Thread Claus Ibsen
You can use event notifier to get callbacks when Camel is shutting down and many other events. Some details here http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html But I think the Main class you use has methods as well you can override for start|stop events. Check

Re: Throttling load balancer

2013-11-08 Thread Claus Ibsen
No out of the box for this. Yeah a custom load balancer, or custom predicate for a content based router etc. Or a java bean for a recipient list can be used. Or maybe look into trying to extend the Camel throttler and then do something else if the throttler limit is hit. Not sure how easy this

Re: Jetty proxy Rest service fails for file uploading

2013-11-08 Thread berdoni
I have implemented a Multipart ReST file upload service for testing the route in case of a multipart WS. Direct call works OK but not the camel jetty proxy. In this case I don't get an ERROR just a status code 500. 14:18:56,114 | DEBUG | HttpClient-364 | JettyContentExchange | 178 -

Re: Adding end point details to Camel logs

2013-11-08 Thread Raul Kripalani
Camel won't do this, but you can set up your logging stack to achieve this, e.g. log4j or logback. You should be able to create custom PatternLayouts in log4j or new LoggerConverters in logback. Regards, *Raúl Kripalani* Apache Camel PMC Member Committer | Enterprise Architect, Open Source

camel-soap schema validation

2013-11-08 Thread helander
Is it possible to do schema validation while unmarshalling SOAP XML messages using the camel-soap dataformat? -- View this message in context: http://camel.465427.n5.nabble.com/camel-soap-schema-validation-tp5742850.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is there a way to send a message when I am terminating?

2013-11-08 Thread pmp.martins
Hey, I have read the Main API and decided to override the doStart and doStop methods. However, they don't work as one may expect, espcially the doStop method, which seems quite useless. First I have a problem. In my main, when I use main.start(), the progam does not hangup, even though I specify

Re: SJMS failure with stale reply queue

2013-11-08 Thread Harald Wellmann
Here's a slightly different scenario demonstrating the issue with SJMS, this time not involving stale temp queues: 1) Start ActiveMQ Broker 2) Start JBoss with Camel/SJMS consumer application 3) Run one-shot producer application (i.e. simple program which sends one message and then exits). 4)

Re: camel-soap schema validation

2013-11-08 Thread David Karlsen
You could stick a validator as the second step in the route? There is a camel-validator component 8. nov. 2013 13:53 skrev helander leh...@gmail.com følgende: Is it possible to do schema validation while unmarshalling SOAP XML messages using the camel-soap dataformat? -- View this

Not display message in active mq

2013-11-08 Thread Rajalakshmi Raman
I tried to send messages from active mq to browser. But it is not even passing to active mq. I am getting error like this. Nov 08, 2013 6:38:32 PM org.springframework.jms.connection.SingleConnectionFacto ry initConnection INFO: Established shared JMS Connection: ActiveMQConnection

Re: Throttling load balancer

2013-11-08 Thread Henryk Konsek
No out of the box for this. Thanks Claus. That's what I expected, but just wanted to be sure. Cheers. -- Henryk Konsek http://henryk-konsek.blogspot.com

Converter - body with single instance into a List

2013-11-08 Thread brenuart
Hello, I was wondering if there are any converter registered by default in Camel to convert a body made of a single object (instance) into a List holding that single instance. The idea is to be able to write something like: List l = exchange.getIn().getBody(List.class); If there is no such

Re: Is there a way to send a message when I am terminating?

2013-11-08 Thread Claus Ibsen
Look better at the javadoc / api. There is afterStart / beforeStop methods. And you should use the run method to keep it running. And enableHangup if you want Camel to detect if the JVM is terminated with ctrl +c, etc. And stop graceful. On Fri, Nov 8, 2013 at 1:54 PM, pmp.martins

Re: Question About JNDI Registry when Running Camel in JBoss Application Server

2013-11-08 Thread kraythe .
So for sure the camel registry is not integrated with the app server. No problem, I can register stuff from the app server in the CamelContextLifecycle *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn:

Re: Factoring out exception Handling fragments.

2013-11-08 Thread kraythe .
Yeah I can inherit classes but I don't see where that gets me anywhere. How to I declare the onException part and then use it in a route later? I know the route DSL just builds a map that is later instantiated by the camel engine. I want to build a part and then use it. Something like this:

Re: Converter - body with single instance into a List

2013-11-08 Thread kraythe .
Did you try just: from(direct:start).convertBodyTo(List.class).to(mock:result) *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39

Re: Camel routing issue

2013-11-08 Thread kraythe .
I think you need to end the inner split with a .end() call. When you split the route you replace the current body with one of the split bodies and they get executed individually. If you want to do something after that split is processed, you have to end the split and then restore the exchange body

Re: Converter - body with single instance into a List

2013-11-08 Thread brenuart
kraythe wrote Did you try just: from(direct:start).convertBodyTo(List.class).to(mock:result) Yes I did but it doesn't work - it fails with an error message like No type converter available to convert from type: java.lang.String to the required type: java.util.List... It works if I register a

Re: Factoring out exception Handling fragments.

2013-11-08 Thread Taariq Levack
An abstract CXF route builder for example can handle all exceptions in a certain way. No need to mention it in the subclass, just call super.configure() where you have the onException Taariq On 08 Nov 2013, at 16:52, kraythe . kray...@gmail.com wrote: Yeah I can inherit classes but I

RabbitMQ producer routing key only as an Exchange header?

2013-11-08 Thread Alex Sherwin
The code and docs seem pretty clear.. The consumer side makes sense, being able to set the Routing Key for binding and optional Queue name... But why must the producer side set an Exchange header to set the routing key? Doesn't this make it very difficult to write fluent routes.. for example,

Re: [Camel + Websphere MQ ] How to send MQRFH2 properties and ReplyToQ

2013-11-08 Thread nanotech
Hi David, I am using MQ 7 and trying to set properties in usr folder(MQRFH V2 header ) and trying to view them as Named Properties through MQ Explorer. http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzaw.doc%2Fjm25440_.htm I tried the code that you provided,

Re: OnCompletion issue in Camel-ActiveMQ

2013-11-08 Thread Christian Posta
Jay, I think you had it mostly correct. I wrote a unit test that shows it working here: https://github.com/christian-posta/camel-sandbox/blob/master/camel-2.12.1-issues/src/test/java/posta/ActiveMQOnCompletionTest.java Maybe you can check that out and align it with your use case and see what

Re: Is there a way to send a message when I am terminating?

2013-11-08 Thread pmp.martins
Hey there, I found out what the problem was... and I am not sure what to say about it. Aparently, If I run my sample application using the command line and Maven: mvn exec:java -Dexec.mainClass=servers.MyApp_B, everything works as it is supposed to be. However, if I do this in Eclipse IDE, when I

Read and process very large files

2013-11-08 Thread brenuart
Hello, I need to poll and read text files from a given directory. Each file holds a large but variable number of Item instances (+100K) possibly encoded on a multiple lines (exact number not known in advance). (1) My first approach was to use a custom Splitter that would take the File in input

Send a message in the easiest way

2013-11-08 Thread pmp.martins
I am trying to create a sample application hosted at mina:tcp://localhost:9991 that sends a very simple message to a server hosted at mina:tcp://localhost:9990. Now admittedly I have some problems understanding how to do this. My first approach was to create a class called Message, that had two

Re: Camel Quartz2 Clustering fails due to durable jobs, has anyone got

2013-11-08 Thread donzur
I am running into a similar problem. I am trying to use the Quartz2 component in Camel to implement a clustered timer so that I can support HA timer routes across multiple servers. When i try to start the route against a clean quartz database, I can connect and the timer starts polling. If I

Re: Send a message in the easiest way

2013-11-08 Thread Christian Posta
Inline... On Fri, Nov 8, 2013 at 12:46 PM, pmp.martins pmp.mart...@campus.fct.unl.pt wrote: I am trying to create a sample application hosted at mina:tcp://localhost:9991 that sends a very simple message to a server hosted at mina:tcp://localhost:9990. Now admittedly I have some problems

Re: Send a message in the easiest way

2013-11-08 Thread pmp.martins
Inline? What do you mean? I realized that the sample I provided may not be enough, so here I am posting the other samples: MyApp_A (localhost:9990) http://pastebin.kde.org/pkpqyaepc The bean that is used: http://pastebin.kde.org/pdyobfunn I am using the routes in MyApp_A by calling the bean. :S

Concurrent consumption with activemq does not work properly (Was: Questions about concurrent consumers and activemq)

2013-11-08 Thread Lothar Werzinger
What's really peculiar is that the behavior of the consumer changes if a producer connects and produces to the route. As you can see in the attached log file it starts out with the consumer running and the log entries are about 2 seconds apart (the fake processing time for each message). Then the

CamelContextLifecycle Has a Glaring Deficiency

2013-11-08 Thread kraythe .
The problem is that if we are using a ServletContextListener (jndi or simple) the lifecycle methods get called after the routes have been built. This prevents the routes from being able to use object in the registry. In specific, I register some configuration information there. To work around

How to get JMX running on EAP 6.1.1 (JBoss 7+)

2013-11-08 Thread kraythe .
When I start the camel context, I get the following exceptions: [Server:Local01] 20:30:49,901 INFO [org.apache.camel.component.servletlistener.CamelServletContextListener] (ServerService Thread Pool -- 149) CamelContextServletListener initializing ... [Server:Local01] 20:30:55,152 INFO

Re: Is there a way to send a message when I am terminating?

2013-11-08 Thread Alex Sherwin
I've run up against this before and came accross this https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016 Alex Sherwin alex.sher...@acadiasoft.com On Nov 8, 2013, at 12:26 PM, pmp.martins pmp.mart...@campus.fct.unl.pt wrote: Hey there, I found out what the problem was... and I am not sure

Re: Send a message in the easiest way

2013-11-08 Thread Christian Posta
inline means i responded to you in the context of your email by providing my comments for some of the questions you asked... On Fri, Nov 8, 2013 at 3:57 PM, pmp.martins pmp.mart...@campus.fct.unl.pt wrote: Inline? What do you mean? I realized that the sample I provided may not be enough, so

Re: Using MINA from RouteBuilder Causing Exception in Karaf

2013-11-08 Thread peter.berkman
A little further, but now I'm really stuck... How can a component's Endpoint not implement createEndpointUri()? -- View this message in context: http://camel.465427.n5.nabble.com/Using-MINA-from-RouteBuilder-Causing-Exception-in-Karaf-tp5742911p5742912.html Sent from the Camel - Users

Re: Send a message in the easiest way

2013-11-08 Thread Claus Ibsen
To send a message then using the ProducerTemplate is the easiest. You can use that to send a message to any Camel endpoint. You can find some details about this on the Camel web site, and also appendix C in the CiA book There is also annotations such as @Produce