how to get jetty logging to debug cxfrs servce 500

2015-10-23 Thread toomanyedwards
Hi all, I am attempting to define a rest service using camel DSL. When I start my camel context with my route and attempt an HTTP GET to my endpoint I am getting a 500 and it's not making it to any of my processors so I think the issue may be happening internal to Jetty. Maybe I'm missing a depe

Re: How to bind context properties to method parameters?

2015-05-07 Thread toomanyedwards
Yes, we want to be able to bind to the properties on the CamelContext. The reason we want to do this is that we have config information that is effectively immutable for the life of the CamelContext (timeouts, db config info, etc.) and our routes depend on this info. When our routes execute we w

How to bind context properties to method parameters?

2015-05-07 Thread toomanyedwards
Hi all, There are clearly defined ways to bind header and exchange property values to method parameters via annotations as doc'd here: http://camel.apache.org/parameter-binding-annotations.html. My question is what is the best practice to bind *context* properties to method parameters. Currentl

Re: How to trap most specific exceptions?

2015-02-23 Thread toomanyedwards
Thanks for the pointer. Can you give some insight into why Camel matches from the bottom up of the exception chain rather from the top? This appears to be an explicit design decision and it'd be useful to know the rationale behind it to help leverage exception trapping more effectively. -- Vie

How to trap most specific exceptions?

2015-02-20 Thread toomanyedwards
Hi all, I have situation like this. My route can throw the following exceptions: ApplicationExceptionFoo->caused by IOException ApplicationExceptionBar->caused by IOException Generic IOException I want to be able to specifically trap ApplicationExceptionFoo, ApplicationExceptionBar and

Why does the default Camel onException match go from bottom up of exception cause?

2015-02-19 Thread toomanyedwards
Hi all, I'm relatively new to Camel and am working on exception handling in our Camel route. My question is why does the default camel exception policy search for onException matches from the bottom of the exception cause stack vs from the top? Seems like matching from the top down would make

Reusable route definitions?

2014-09-15 Thread toomanyedwards
Hey all, I have several "direct:" routes that I'd like to be able to reuse across multiple standalone camel projects. I am currently using Java DSL to define my routes. Can anyone point me to any existing patterns for creating reusable route definitions? The solution I've come up with is creat

Re: Why does RouteDefinition have "from" methods?

2014-09-12 Thread toomanyedwards
I understand that a route can have multiple inputs that lead to the same processing something like: routeBuilder.from("direct:foo, direct:bar").to("direct:doSomething"); But in the case I described earlier: myRouteDefinition = routeBuilder.from("direct:foo"); myRouteDefinition.to("dire

Why does RouteDefinition have "from" methods?

2014-09-11 Thread toomanyedwards
Hey all, I'm still climbing the learning curve on Camel terminology, etc. It makes sense to me that I start defining a route by calling RouteBuilder.from and get a RouteDefinition which I can then use to continue to define my route. What makes less sense to me is that RouteDefinition itself has

How to turn on camel httpClient logging in karaf?

2014-02-19 Thread toomanyedwards
Hi all, We are having issues with a camel route deployed in Karaf that we believe are due to the connection pooling settings of the apache httpClient used by the Camel http component. To validate this, we'd like to able to turn on logging for the apache httpClient used by camel. I have edited t

Re: Best practice for checking method exists on class when building route?

2014-02-04 Thread toomanyedwards
Thanks! Testing before delivering is exactly what we're doing. :-) Our tests found that there was a difference between how camel 2.10 and camel 2.12 lookup and invoke methods that would cause our route to throw an exception because camel could no longer find the method we wanted to call in 2.12.

Best practice for checking method exists on class when building route?

2014-02-03 Thread toomanyedwards
Hi all, In our camel routes we sometimes set header values dynamically, by doing something like the following: .setHeader(SOME_HEADER_NAME).method(SomeClass.class, SOME_METHOD_SIGNATURE_STRING) Ideally, we'd like to able to validate that the method specified by the signature SOME_METHOD_SIGNATU

Re: Breaking change is bean parameter binding from Camel 2.10 to 2.12?

2014-01-30 Thread toomanyedwards
This worked for us in 2.10. Was this functionality specifically changed in later versions? -- View this message in context: http://camel.465427.n5.nabble.com/Breaking-change-is-bean-parameter-binding-from-Camel-2-10-to-2-12-tp5746630p5746632.html Sent from the Camel - Users mailing list archiv

Breaking change is bean parameter binding from Camel 2.10 to 2.12?

2014-01-30 Thread toomanyedwards
Hi all, We are attempting to upgrade from Camel to 2.10 to Camel 2.12, but are experiencing what appears to be a backwards incompatibility in the bean method parameter mapping between 2.10 and 2.12. Here's a distilled version of the issue. We have routes with Java DSL that so do something like

Re: soTimeout ignored by camel http component

2014-01-21 Thread toomanyedwards
Good point! I'll look into it. Thanks again! -- View this message in context: http://camel.465427.n5.nabble.com/soTimeout-ignored-by-camel-http-component-tp5746289p5746303.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: soTimeout ignored by camel http component

2014-01-21 Thread toomanyedwards
Great! Thank you for the clarification. Makes sense. IMHO, it'd be great if this functionality was documented more explicitly in the http component doc. Seems like I wasn't the only one surprised by the way it works based on the current docs. Also, it'd be helpful if the docs were more explici

Re: soTimeout ignored by camel http component

2014-01-21 Thread toomanyedwards
Great! Could the timeout then be different if I have several http endpoints in a single route (e.g - "http://myservicefoo?httpClient.soTimeout=500"; and "http://myservicebar?httpClient.soTimeout=2500";) or is the timeout global for a route? That is, do all http endpoints in a route use a single c

Re: soTimeout ignored by camel http component

2014-01-21 Thread toomanyedwards
Does that mean we can configure an endpoint in our route something like "http://dummyUri?httpClient.soTimeout=5000"; and then before we use that endpoint specify a URI using the Exhange.HTTP_URI header (e.g. - http://myservice.com) and in the example my route would use http://myservice.com but woul

soTimeout ignored by camel http component

2014-01-21 Thread toomanyedwards
Hi all, We are trying to set the timeout for http client connections. The http component docs (http://camel.apache.org/http.html) indicate that we should be able to set this as a URI param (eg. - http://foo.com?httpClient.soTimeout=5000), BUT this doesn't work if setting the URI via the Exchange

Re: How can I avoid setting namespace prefixes in xpath expressions in camel?

2013-11-02 Thread toomanyedwards
Thanks, Claus. Looks like the javax.xml.xpath.XPathFactory.setFeature() functionality could potentially be leveraged at some point to do this. If camel exposed access to this standard method and a route was configured to use the saxon parser then it looks like we could leverage the saxon featur

Re: How can I avoid setting namespace prefixes in xpath expressions in camel?

2013-11-01 Thread toomanyedwards
I thought I made it clear in my original question, but I guess not. What I'm trying to is *not* have to specify in my xpath. /nsprefix:book/nsprefix:chapter is extremely cluttered and redundant. It be much better if we could just specify: /book/chapter and tell the processor what the default

How can I avoid setting namespace prefixes in xpath expressions in camel?

2013-10-31 Thread toomanyedwards
Hi all, I am using xpath to set camel header values. Given a document that looks something like this: http://mydomain.com";> some text I can do something like this fine: .setHeader(MY_HEADER_NAME). .xpath("/nsprefix:book/nsprefix:chapter/text()",String.class, new Namespaces("nspref

How do I determine which endpoint validation exception came from?

2013-05-14 Thread toomanyedwards
Hi all, I'm relatively new to camel. I have a route where I need to do validation twice (once on the initial input and the then after processing). I have a SchemaValidationException handler defined which catches validation errors. My question is what is the best practice to determine which end