In the second route, you should use jetty: in the uri! When you want to listen for http traffic you should always use jetty:.
Cheers, Ade ----- Original Message ----- From: Charles Moulliard <cmoulli...@gmail.com> To: users@camel.apache.org <users@camel.apache.org> Sent: Fri Dec 11 09:43:32 2009 Subject: Re: camel-jetty and loadbalancing We progress. With the following config, the HTTP request ( http://localhost:8181/reportservice/incidents/) is able to reach the server 8282 but it fails to answer and generate error java.lang.IllegalArgumentException: host parameter is null at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:206) at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:155) <camel:route> <camel:from uri="jetty: http://localhost:8181?matchOnUriPrefix=true"/> <camel:setExchangePattern pattern="InOut"/> <camel:loadBalance> <camel:roundRobin/> <camel:to uri="http://localhost:8282/"/> </camel:loadBalance> </camel:route> <camel:route> <camel:from uri="http://localhost:8282"/> <camel:to uri="cxfbean:reportIncidentServiceBean"/> </camel:route> The doc mentions that a http endpoint cannot used as a consumer (= from) but as a producer (=to) Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com twitter : http://twitter.com/cmoulliard Linkedlin : http://www.linkedin.com/in/charlesmoulliard Apache Camel Group : http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm On Fri, Dec 11, 2009 at 3:25 PM, Adrian Trenaman <trena...@progress.com>wrote: > You should use camel-http instead of -jetty for your http producer > endpoints! I.e. Start your uri for the producers with http:// rather than > jetty:http:// > > HTH, > Ade > > ----- Original Message ----- > From: Charles Moulliard <cmoulli...@gmail.com> > To: users@camel.apache.org <users@camel.apache.org> > Sent: Fri Dec 11 09:13:35 2009 > Subject: camel-jetty and loadbalancing > > I try to use loadbalancing with camel-jetty but I'm not quite sure that > what > I do is correct. > > Is this configuration correct ? > > <camel:route> > <camel:from > uri="jetty:http://localhost:8080< > http://localhost:8080?matchOnUriPrefix=true> > "/> > <camel:loadBalance> > <camel:roundRobin/> > <camel:to > uri="jetty:http://localhost:8282< > http://localhost:8282?matchOnUriPrefix=true> > "/> > <camel:to > uri="jetty:http://localhost:8383< > http://localhost:8383?matchOnUriPrefix=true> > "/> > <camel:to > uri="jetty:http://localhost:8484< > http://localhost:8484?matchOnUriPrefix=true> > "/> > </camel:loadBalance> > </camel:route> > > <camel:route> > <camel:from uri="jetty: > http://localhost:8282?matchOnUriPrefix=true"/> > <camel:to uri="cxfbean:reportIncidentServiceBean"/> > </camel:route> > > Regards, > > Charles Moulliard > Senior Enterprise Architect > Apache Camel Committer > > ***************************** > blog : http://cmoulliard.blogspot.com > twitter : http://twitter.com/cmoulliard > Linkedlin : http://www.linkedin.com/in/charlesmoulliard > > Apache Camel Group : > http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm >