Re: Using HTTP and HTTPS proxies with Camel HTTP Component

2013-09-20 Thread Alex Anderson
On 15 September 2013 05:36, Christian Posta wrote: > Alex, > > As Christian M. points out, use the camel config on the endpoint, not the > way you're doing in your OP. > > Cheers > > > On Wed, Sep 11, 2013 at 6:03 AM, Alex Anderson wrote: > >> On

Re: Using HTTP and HTTPS proxies with Camel HTTP Component

2013-09-11 Thread Alex Anderson
On 10 September 2013 22:49, Christian Müller wrote: > Did you tried setting the proxy host/port as we described here [1]? Hi Christian, Thanks for the suggestion. Do you mean something other than what I referred to in my original post? >camelContext.properties['http.proxyHost'] = > System

Using HTTP and HTTPS proxies with Camel HTTP Component

2013-09-05 Thread Alex Anderson
I'm writing some test code which uses and HTTP/HTTPS proxy to mock 3rd party webservices. For non-camel code, I configure the proxy using the java system properties: http.proxyHost, http.proxyPort, https.proxyHost, https.proxyPort, http.nonProxyHosts. These settings seem to be ignored by camel, s

Re: [2.9.5] body=null after onException(_).handled(false)

2013-02-06 Thread Alex Anderson
Henryk, Sorry for the confusion - my error handler is written in Groovy, and the definition of the exception handler is as follows: // N.B. This method implicitly returns null def exception(Exchange exchange) { System.out.println("Exception: " + exchange.getIn()); } In Java this is eff

Re: [2.9.5] body=null after onException(_).handled(false)

2013-02-06 Thread Alex Anderson
On 5 February 2013 18:39, Henryk Konsek wrote: > Hi Alex, > >> When myBean.slip() throws SpecificException, If I print in.body in >> handleSpecificException(), I can see that it is not null. >> >> If I print it again in handleFailed() it is now null. > > Actually I can't reproduce this problem nei

[2.9.5] body=null after onException(_).handled(false)

2013-02-05 Thread Alex Anderson
I have a route that looks like so: onCompletion().onFailureOnly().beanRef('myBean', 'handleFailed') from('seda:asdf') .onException(SpecificException) .beanRef('myBean', 'handleSpecificException') .handled(false) .end() .dynamicRouter('myB

Re: camel-smpp in trx mode

2013-01-10 Thread Alex Anderson
On 4 January 2013 17:26, Christian Müller wrote: > I think we don't have another camel component where the endpoint is a > consumer and producer. I'm not sure how/if it works or if we hit problems > in other areas (exception handling, ...). We do this for the camel-smslib component. The endpoint

Re: Logging causes NullPointerException

2012-06-20 Thread Alex Anderson
> > No will be in 2.9.3 and 2.10 Nice. I notice from JIRA that there aren't many issues left; is there a date set for release?

Re: Logging causes NullPointerException

2012-06-20 Thread Alex Anderson
> This has been fixed. The issue is the seda consumer has not been > started prior to shutdown. Thanks, Claus. Has the fix been released yet?

Logging causes NullPointerException

2012-06-20 Thread Alex Anderson
Hi, When my route is shutting down in Camel 2.9.2, I get a NullPointerException on line 108 of SedaConsumer. The line reads: LOG.debug("Preparing to shutdown, waiting for {} consumer threads to complete.", latch.getCount()); Is it possible that latch is null? Am I doing something wrong, or

Re: Waiting for Routes to Finish

2012-05-10 Thread Alex Anderson
On 10 May 2012 11:28, Claus Ibsen wrote: > On Thu, May 10, 2012 at 10:06 AM, Alex Anderson wrote: >> On 9 May 2012 18:05, Claus Ibsen wrote: >>> On Wed, May 9, 2012 at 4:57 PM, rdifrango wrote: >> >>> There is an in flight registry you can see number of cur

Re: Waiting for Routes to Finish

2012-05-10 Thread Alex Anderson
On 9 May 2012 18:05, Claus Ibsen wrote: > On Wed, May 9, 2012 at 4:57 PM, rdifrango wrote: > There is an in flight registry you can see number of currently in > flight messages etc. > http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InflightRepository.html Is it pos

Re: Still no MINA 2 / RxTx support on Camel 2.9 ?

2012-03-30 Thread Alex Anderson
Hi Peter, Thanks for the info. We're using RxTx and Java Serial with camel at the moment, but specifically sending and receiving SMS via Hayes/AT commands. Will keep an eye on MINA. Alex On 29 March 2012 19:21, c031917 wrote: > Hi Alex, > > no way today to collect data from serial/parallel  

Re: Still no MINA 2 / RxTx support on Camel 2.9 ?

2012-03-29 Thread Alex Anderson
Hi Peter, Out of interest, what's the current problem with ttyUSB? Are serial ports not supported at all? Alex On 29 March 2012 18:49, Claus Ibsen wrote: > Camel 2.10 will have a camel-mina2 component. > > > On Thu, Mar 29, 2012 at 4:42 PM, c031917 wrote: >> I have seen activities to introdu

Re: Get routeId from Exchange / in Processor

2012-03-26 Thread Alex Anderson
ing I would like to get > easier and cleaner. Currently the data is a bit scattered. > > > > On Mon, Mar 26, 2012 at 11:14 AM, Alex Anderson wrote: >> Is it possible to get the ID of the current route from an Exchange, or >> to have the routeId

Re: Headers disappearing in RoutingSlip

2012-03-26 Thread Alex Anderson
On 23 March 2012 16:33, Claus Ibsen wrote: > Hi > > You can use the tracer to help see where the headers dissappear > http://camel.apache.org/tracer > > And see this FAQ as well > http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html Thanks, Claus. This helped me debug to some e

Get routeId from Exchange / in Processor

2012-03-26 Thread Alex Anderson
Is it possible to get the ID of the current route from an Exchange, or to have the routeId provided to a processor/beanRef method as an argument?

Headers disappearing in RoutingSlip

2012-03-23 Thread Alex Anderson
Hi, can I get a quick sanity check before we spend more time investigating? We're using Camel 2.5.0 and have a setup like this: routing slip -> seda -> processor We set headers in our routing slip, and by the time the message has hit the processor, the headers have been stripped. Is this expecte

Re: How to get header parameter in a to route of camel

2012-03-22 Thread Alex Anderson
> from( "jms:request") >            .process(new AddHeader()) >            .to("cxfrs://http://abc.com/"; + < header (test)>) Have you tried: .to(simple("cxfrs://http://abc.com/${header.test}";))

Re: camel http bug

2012-03-15 Thread Alex Anderson
Is it because the second example's URI starts "http:0" - i.e. is missing // after http:? On 15 March 2012 09:49, asd09 wrote: > i wrote sample > >   >         >         >             >                def formData = "user_nickname=" + > URLEncoder.encode(exchange.context.resolvePropertyPlaceholder

Re: Endpoint exception handling

2012-02-22 Thread Alex Anderson
nt in this area in future. Thanks, Alex On 22 February 2012 16:57, Claus Ibsen wrote: > On Wed, Feb 22, 2012 at 12:02 PM, Alex Anderson wrote: >> Thanks for the confirmation that this is ok, Claus.  Are there any >> other ways to do this within Camel, or would there otherwise need t

Re: Endpoint exception handling

2012-02-22 Thread Alex Anderson
AM, Alex Anderson wrote: >> Hi Claus & Tuomas, >> >> I faced a similar problem a couple of weeks ago and came to the >> following solution: >> >> The exception can be passed to a route in the Consumer like so: >> >>        p

Re: Handling Endpoint failure

2012-02-22 Thread Alex Anderson
Hi Ashwin, Thanks for your help on this. I ended up solving this by creating an Exchange with the Exception attached, like so: The exception can be passed to a route in the Consumer like so: class MyConsumer { ... public void handleEndpointException(EndpointException ex) {

Re: Endpoint exception handling

2012-02-22 Thread Alex Anderson
Hi Claus & Tuomas, I faced a similar problem a couple of weeks ago and came to the following solution: The exception can be passed to a route in the Consumer like so: public void handleEndpointException(EndpointException ex) { Exchange exchange = getEndpoint().createExcha

Re: Handling Endpoint failure

2012-02-15 Thread Alex Anderson
Hi Ashwin, Thanks for the tip. If I have access to the Consumer, can I just call `consumer.getExceptionHandler().handleException(new ConnectException(...))`? Alex On 15 February 2012 18:00, Ashwin Karpe wrote: > Hi, > > Since the Camel endpoint has no way of knowing whether the service is up

Handling Endpoint failure

2012-02-15 Thread Alex Anderson
Hi, I'm working on an Endpoint which has a background service keeping it alive. When this service fails, I would like the associated Exception (or a derived Exception) to propagate to Camel so that it can be dealt with. In the application I am working on, the behaviour in this case would be to d

Re: Component Design - SMSLib

2012-01-26 Thread Alex Anderson
n. > > The question I have for you is how to you envision the unit testing for this > component? Is there a way to have a mock service provider? We obviously > cannot afford using a real service for the unit tests. > > Cheers, > Hadrian > > > On 01/26/2012 09:21 AM, Ale

Re: Component Design - SMSLib

2012-01-26 Thread Alex Anderson
r/DefaultConsumer/DefaultEndpoint/DefaultComponent/DefaultMessege > should be the base classes you need > > > Alex Anderson wrote >> >> * are there any good resources for writing Endpoints that I should be >> reading? >> * does anyone know of any similarly-modelled

Component Design - SMSLib

2012-01-26 Thread Alex Anderson
I'm working on a Camel component for SMSLib (http://www.smslib.org). This is a Java library for communicating with mobile phones and modems via a serial connection to send and receive SMS messages using the Hayes (AT) command set. I have a working prototype - you can see the source at https://gith