Re: from webservice to queue

2013-03-15 Thread Christian Müller
The cxf component supports also the jms protocol out of the box...

Sent from a mobile device
Am 15.03.2013 23:40 schrieb "santhosh" :

> If you are trying to do CXF proxy .ie. receive all request to a CXF
> webservice by setting up a proxy endpoint this will work
> 
>  address="http://localhost:9000/order"; wsdlURL=" wsdl
> on filesystem/server>" endpointName=""
> serviceName="">
> 
>
> 
> 
>   
>   
> 
> 
>
> All namespace resolution is left out.Just to give you an idea.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/from-webservice-to-queue-tp5729239p5729274.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: How to add HTTP Basic and Digest Auth on CXF component

2013-03-15 Thread Christian Müller
The cxf component supports basic auth (we use it in one of our project).
Google will help you to find a code snippet...

Sent from a mobile device
Am 15.03.2013 23:27 schrieb "santhosh" :

> If you dont get it sorted out with a CXF client,the simplest way would be
> send the soap body to the route.It would suffice to make a post request
> with
> authorization header to get Basic auth working.It can be
> HttpConnection,HttpClient,Camel using HttpClient.
>
> 
>
>
>   uri="file:C:/soapEnvelopeInput.txt">
>  headerName="CamelHttpMethod">
> POST
> 
>  headerName="Authorization"> Basic
> userencoded:passencoded
> 
>
>
>
> 
> 
>
> or you can simply write a HttpClient and set the authorization
> header.Nothing to with camel.Just make sure the body is SoapEnvelope.
>
> for example something like this body will work
>
> 
> http://www.w3.org/2003/05/soap-envelope
> "
> xmlns:a="http://www.w3.org/2005/08/addressing";>
> 
>
> 
> 
> ] 
> 
> 
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-add-HTTP-Basic-and-Digest-Auth-on-CXF-component-tp5729234p5729272.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: from webservice to queue

2013-03-15 Thread santhosh
If you are trying to do CXF proxy .ie. receive all request to a CXF
webservice by setting up a proxy endpoint this will work

http://localhost:9000/order"; wsdlURL="" endpointName=""
serviceName="">




  
   



All namespace resolution is left out.Just to give you an idea.



--
View this message in context: 
http://camel.465427.n5.nabble.com/from-webservice-to-queue-tp5729239p5729274.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Transaction spanning multiple threads query

2013-03-15 Thread Christian Müller
Short answer: no
Camel leverage on the Spring Platform Transaction Manager which doesn't
support this.

Sent from a mobile device
Am 15.03.2013 21:38 schrieb "gilboy" :

> Hi
>
> I have 2 routes. The first route calls a DAO method which makes a change to
> an Oracle database table. When done it places the message on to a seda
> queue.
>
> My second route picks the message from the seda queue and invokes another
> DAO method resulting in another change to an oracle table. My query is, if
> I
> use the transaction syntax in my route will the transaction span multiple
> routes(hence multiple threads)?
>
> Thanks
> Joe
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Transaction-spanning-multiple-threads-query-tp5729268.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: How to add HTTP Basic and Digest Auth on CXF component

2013-03-15 Thread santhosh
If you dont get it sorted out with a CXF client,the simplest way would be
send the soap body to the route.It would suffice to make a post request with
authorization header to get Basic auth working.It can be
HttpConnection,HttpClient,Camel using HttpClient.



  
 

POST

 
Basic
userencoded:passencoded 







or you can simply write a HttpClient and set the authorization
header.Nothing to with camel.Just make sure the body is SoapEnvelope.

for example something like this body will work


http://www.w3.org/2003/05/soap-envelope";
xmlns:a="http://www.w3.org/2005/08/addressing";> 



 
] 


 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-add-HTTP-Basic-and-Digest-Auth-on-CXF-component-tp5729234p5729272.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: from webservice to queue

2013-03-15 Thread Christian Müller
Not really. In this case you will send "OK" to your queue for every web
service call...

Sent from a mobile device
Am 15.03.2013 11:57 schrieb "takidean" :

> Hi
> i have to receive an external webservice and route it into a jms queue this
> , is that useful
>
> public void configure() throws Exception {
> // TODO Auto-generated method stub
> from("cxf://http://localhost:9000/order/";)
> .setBody(constant("ok"))
> .to("jms:xmlorders");
>
> }}
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/from-webservice-to-queue-tp5729239.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


UNknown host timeout during http4 component unicast

2013-03-15 Thread santhosh
Hi,
I have two cases,

Case A : when multicast is used for multicast









Case B : when multicast is actually (ab)used for unicast






The route directA  throws UnknownHostException in 12 s.In case A ,its
working perfectly.Somehow i get timeout after 2500  ms.But B timeout set on
multicast doesnt work.I get response in  case B after 12s.I know you 
setSOTimeout and ConnectionTimeout doesnt work for UnknownHostException so
how does case A work.WHat should be done for case B.

Additional Data:
I need 2500 ms response irrespective of Exception
(UnknownHost,SocketTimeout,ConnectionTimeout) or no exception.I would like
to keep code simple by using multicast  because i am planning to dynamically
populate the multicast with endpoints.SO it may 1 ,2 or 10 endpoints under
multicast.

my only option now is 

 
 


Do you think i doing something wrong with multicast.Should i proceed with
above route or is there a better way.

Thanks,
Santhosh



--
View this message in context: 
http://camel.465427.n5.nabble.com/UNknown-host-timeout-during-http4-component-unicast-tp5729270.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Transaction spanning multiple threads query

2013-03-15 Thread gilboy
Hi

I have 2 routes. The first route calls a DAO method which makes a change to
an Oracle database table. When done it places the message on to a seda
queue. 

My second route picks the message from the seda queue and invokes another
DAO method resulting in another change to an oracle table. My query is, if I
use the transaction syntax in my route will the transaction span multiple
routes(hence multiple threads)? 

Thanks
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Transaction-spanning-multiple-threads-query-tp5729268.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: zip file best practices

2013-03-15 Thread Henryk Konsek
> Otherwise its hard for our end users
> to know such functionality exists.

Is there any particular reason to provide separated splitter in
camel-core instead of enhancing existing ZipFile Data Format? Am I
missing something? :) The following snippet would look just perfect
for me...

from(...).unmarshal().zipFile().split(body(Iterable.class)).to(...)

In my humble opinion ZipFile data format is responsible for handle
ZipEntry streams, so we shouldn't create ZipSplitter in camel-core but
rather improve existing ZipFile code.

Best regards.

--
Henryk Konsek
http://henryk-konsek.blogspot.com


Re: AWS S3 Request/Reply

2013-03-15 Thread Bilgin Ibryam
You mentioned processing files in order, if that is really important for
your application, just keep in mind this from aws documentation:

"Amazon SQS makes a best effort to preserve order in messages, but due to
the distributed nature of the queue, we cannot guarantee that you will
receive messages in the exact order you sent them."


Bilgin

On 5 March 2013 15:52, json99  wrote:

> Hi,
>
> I'm trying to build a cloud enabled Camel client. To be able to transfer
> large files (>65k) I first create a AWS S3 file with a UUID as filename. To
> be able to process the messages in order I also create a AWS SQS message
> containing the UUID of the file in S3. When I receive a SQS message I would
> like to extract the UUID and make another request to S3 to grab the file
> content.
>
> As I understand, the Camel AWS-S3 component can only poll and is not
> enabled
> for request/reply?
>
> Is it possible to implement the desired behavior or are there any other
> solutions to my goal of sending large files i a queue matter?
>
> Regards,
>
> Daniel By
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/AWS-S3-Request-Reply-tp5728579.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: How to escape commas(,) in CSV file

2013-03-15 Thread Henryk Konsek
Hi,

> Can some one tell me how to escape comma in camel csv component.

Actually CSV component doesn't conform Camel standards in 100%. First
of all it depends on the project with no stable release [1] and
basically no documentation. It is even hard to get the sources of the
CSV library jar used by Camel, as it is some kind of snapshot taken
from the trunk at certain point of time.

I personally don't know how to escape CSV with our component, so I
process my messages with StringEscapeUtils.html#escapeCsv [2] method
from Apache Commons before passing them to the CSV data format.

Actually I created camel-csv-simple data format which doesn't depend
on Commons CSV project. It works similarly to camel-csv but doesn't
require any additional dependencies and handles CSV escaping
out-of-the-box by default. I  guess I should have committed it some
time ago. I'll try to submit it to trunk after some discussion with
fellow Camel riders.

In the meantime StringEscapeUtils.html#escapeCsv could be a way to go :) .

Best regards.

[1] http://commons.apache.org/proper/commons-csv/downloads.html
[2] 
http://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/StringEscapeUtils.html#escapeCsv(java.lang.String)

--
Henryk Konsek
http://henryk-konsek.blogspot.com


Re: Using camel:routeContextRef under camel:camelContext

2013-03-15 Thread deepak_a
Hi,

There was a matching ending tag for routeContex. (the routes.xml was quite
large, so I had pasted only a section of it)

Issue is not because of invalid XMl but because of namespace but not able to
figure it out


http://camel.apache.org/schema/spring";>




MICS











--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-camel-routeContextRef-under-camel-camelContext-tp5729133p5729258.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using camel:routeContextRef under camel:camelContext

2013-03-15 Thread Claus Ibsen
Hi

You need an endingtag.

You know any modern IDE can do XML validation.


On Fri, Mar 15, 2013 at 4:19 PM, deepak_a  wrote:
> Hi All,
>
> Based on reading posts by other users I am following this approach.
> An applicationCOntext that has a camel:camelContext (that defines define one
> or more camel:routeContextRef )
>
> Each of these camel:routeContextRef is referred in routes.xml (routeContext
> id)
>
> These routes.xml will be loaded camelContext via API (the routes.xml are
> being read as IOStream)
>
> RoutesDefinition routes =
> camelContext.loadRoutesDefinition(streamList.get(i));
> camelContext.addRouteDefinitions(routes.getRoutes());
>
> By Routes.xml looks like this
>
> 
>
> http://www.springframework.org/schema/beans";
> xmlns:amq="http://activemq.apache.org/schema/core";
> xmlns:camel="http://camel.apache.org/schema/spring";
> xmlns:context="http://www.springframework.org/schema/context";
> xmlns:http="http://cxf.apache.org/transports/http/configuration";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd
> http://cxf.apache.org/transports/http/configuration
> http://cxf.apache.org/schemas/configuration/http-conf.xsd";>
>
>
>  xmlns="http://camel.apache.org/schema/spring";>
>
> 
> 
> 
>
> 
> 
>
>
>
> However on trying to do this I see the following exception.
>
>
>
> INFO  Exception caught: unexpected element
> (uri:"http://www.springframework.org/schema/beans";, local:"beans"). Expected
> elements are
> <{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring}aop>,<{http://camel.apache.org/schema/spring}batchResequencerConfig>,<{http://camel.apache.org/schema/spring}bean>,<{http://camel.apache.org/schema/spring}bindy>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring}choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring}contextScan>,<{http://camel.apache.org/schema/spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}crypto>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring}customDataFormat>,<{http://camel.apache.org/schema/spring}customLoadBalancer>,<{http://camel.apache.org/schema/spring}dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring}description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring}doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring}dynamicRouter>,<{http://camel.apache.org/schema/spring}el>,<{http://camel.apache.org/schema/spring}enrich>,<{http://camel.apache.org/schema/spring}expression>,<{http://camel.apache.org/schema/spring}expressionDefinition>,<{http://camel.apache.org/schema/spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring}flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring}groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring}header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring}idempotentConsumer>,<{http://camel.apache.org/schema/spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring}intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring}interceptToEndpoint>,<{http://camel.apache.org/schema/spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring}jibx>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring}jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring}loadBalance>,<{http://camel.apache.org/schema/spring}log>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring}marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring}multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring}ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring}onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring}packageScan>,<{http://camel.apache.org/schema/spring}pgp>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring}pipeline>,<{htt

Re: Using camel:routeContextRef under camel:camelContext

2013-03-15 Thread deepak_a
Hi All,

Based on reading posts by other users I am following this approach.
An applicationCOntext that has a camel:camelContext (that defines define one
or more camel:routeContextRef )

Each of these camel:routeContextRef is referred in routes.xml (routeContext
id)

These routes.xml will be loaded camelContext via API (the routes.xml are
being read as IOStream)

RoutesDefinition routes =
camelContext.loadRoutesDefinition(streamList.get(i));
camelContext.addRouteDefinitions(routes.getRoutes());

By Routes.xml looks like this



http://www.springframework.org/schema/beans";
xmlns:amq="http://activemq.apache.org/schema/core";
xmlns:camel="http://camel.apache.org/schema/spring";
xmlns:context="http://www.springframework.org/schema/context";
xmlns:http="http://cxf.apache.org/transports/http/configuration";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd   
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd   
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd   
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd   
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd";>


http://camel.apache.org/schema/spring";>










However on trying to do this I see the following exception.



INFO  Exception caught: unexpected element
(uri:"http://www.springframework.org/schema/beans";, local:"beans"). Expected
elements are
<{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring}aop>,<{http://camel.apache.org/schema/spring}batchResequencerConfig>,<{http://camel.apache.org/schema/spring}bean>,<{http://camel.apache.org/schema/spring}bindy>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring}choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring}contextScan>,<{http://camel.apache.org/schema/spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}crypto>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring}customDataFormat>,<{http://camel.apache.org/schema/spring}customLoadBalancer>,<{http://camel.apache.org/schema/spring}dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring}description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring}doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring}dynamicRouter>,<{http://camel.apache.org/schema/spring}el>,<{http://camel.apache.org/schema/spring}enrich>,<{http://camel.apache.org/schema/spring}expression>,<{http://camel.apache.org/schema/spring}expressionDefinition>,<{http://camel.apache.org/schema/spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring}flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring}groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring}header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring}idempotentConsumer>,<{http://camel.apache.org/schema/spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring}intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring}interceptToEndpoint>,<{http://camel.apache.org/schema/spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring}jibx>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring}jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring}loadBalance>,<{http://camel.apache.org/schema/spring}log>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring}marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring}multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring}ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring}onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring}packageScan>,<{http://camel.apache.org/schema/spring}pgp>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring}pipeline>,<{http://camel.apache.org/schema/spring}policy>,<{http://camel.apache.org/schema/spring}pollEnrich>,<{http://camel.apache.org/schema/spring}process>,<{http://camel.apache.org/schema/spring}properties>,<{http://cam

Re: Camel and Perf4j

2013-03-15 Thread Claus Ibsen
On Fri, Mar 15, 2013 at 3:20 PM, Henri Tremblay
 wrote:
> Ok. That's what I thought. It is still strange since technically it is two
> routes (and the JMX does give me stats on both on them).
>

Its not strange, there is events like ExchangeSentToEndpoint you can
use instead etc.
See all the event classes we have in the events package.

Also you may consider looking at tracer for fine grained tracing /
metrics collection
http://camel.apache.org/tracer

And the new backlog tracer in Camel 2.11
http://camel.apache.org/backlogtracer.html

> I'll look at the proposed tools and give you some feedback.
>
> Thanks!
> Henri
>
>
> On 15 March 2013 13:11, Claus Ibsen  wrote:
>
>> On Fri, Mar 15, 2013 at 12:48 PM, Henri Tremblay
>>  wrote:
>> > Hi,
>> >
>> > I would like to use Camel with Perf4j.
>> >
>> > I know that Camel JMX already provide statistics but I would like to be
>> > able to easily see at once all my routes performance and be able generate
>> > nice graph. Perf4j allows me to do that quickly (you know another tool
>> that
>> > will do the same with Camel?)
>> >
>>
>> Yes hawtio can monitor Camel apps. I suggest to take a look.
>> In the upcoming 1.1 release there is going to be a new plugin for
>> showing stats, us
>> http://hawt.io/
>>
>> And there is also a tool called CamelWatch
>> http://sksamuel.github.com/camelwatch/
>>
>>
>>
>> > My first try was to extend EventNotifierSupport and react
>> > to ExchangeCreatedEvent and ExchangeCompletedEvent. Basically this:
>> >
>> >   public void notify(EventObject event) throws Exception {
>> > Exchange exchange = (Exchange) event.getSource();
>> > String tag = exchange.getFromRouteId() + "-" +
>> > exchange.getFromEndpoint();
>> > if (event instanceof ExchangeCreatedEvent) {
>> >   StopWatch watch = new Slf4JStopWatch(tag);
>> >   exchange.setProperty(STOP_WATCH_KEY + tag, watch);
>> > } else if (event instanceof ExchangeCompletedEvent) {
>> >   StopWatch watch = (StopWatch)
>> exchange.removeProperty(STOP_WATCH_KEY
>> > + tag);
>> >   watch.stop();
>> > }
>> >   }
>> >
>> > Of course it doesn't really work. There is no way to have the route id it
>> > seems. Or at least I have strange result. My routes are:
>> >
>> > from("sql:...").setRouteId("a").to("direct-foo");
>> > from("direct:foo").setRouteId("b").to("http:...");
>> >
>> > And instead of getting something like
>> > Created a
>> > Completed a
>> > Created b
>> > Completed b
>> >
>> > I receive something like
>> > Created a-null
>> > Created a-a
>> > Completed a-a
>> > Completed a-a
>> >
>> > Any idea why it behaves like this and what I can do?
>> >
>> > Thanks
>> > Henri
>>
>> You should likely only react to created / completed events. And that
>> is why you may get a null in the from route.
>> And when you use the direct component its NOT creating a new Exchange
>> but routing the existing exchange.
>> And hence why you wont see events for creating / completed from route b.
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cib...@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel and Perf4j

2013-03-15 Thread Henri Tremblay
Ok. That's what I thought. It is still strange since technically it is two
routes (and the JMX does give me stats on both on them).

I'll look at the proposed tools and give you some feedback.

Thanks!
Henri


On 15 March 2013 13:11, Claus Ibsen  wrote:

> On Fri, Mar 15, 2013 at 12:48 PM, Henri Tremblay
>  wrote:
> > Hi,
> >
> > I would like to use Camel with Perf4j.
> >
> > I know that Camel JMX already provide statistics but I would like to be
> > able to easily see at once all my routes performance and be able generate
> > nice graph. Perf4j allows me to do that quickly (you know another tool
> that
> > will do the same with Camel?)
> >
>
> Yes hawtio can monitor Camel apps. I suggest to take a look.
> In the upcoming 1.1 release there is going to be a new plugin for
> showing stats, us
> http://hawt.io/
>
> And there is also a tool called CamelWatch
> http://sksamuel.github.com/camelwatch/
>
>
>
> > My first try was to extend EventNotifierSupport and react
> > to ExchangeCreatedEvent and ExchangeCompletedEvent. Basically this:
> >
> >   public void notify(EventObject event) throws Exception {
> > Exchange exchange = (Exchange) event.getSource();
> > String tag = exchange.getFromRouteId() + "-" +
> > exchange.getFromEndpoint();
> > if (event instanceof ExchangeCreatedEvent) {
> >   StopWatch watch = new Slf4JStopWatch(tag);
> >   exchange.setProperty(STOP_WATCH_KEY + tag, watch);
> > } else if (event instanceof ExchangeCompletedEvent) {
> >   StopWatch watch = (StopWatch)
> exchange.removeProperty(STOP_WATCH_KEY
> > + tag);
> >   watch.stop();
> > }
> >   }
> >
> > Of course it doesn't really work. There is no way to have the route id it
> > seems. Or at least I have strange result. My routes are:
> >
> > from("sql:...").setRouteId("a").to("direct-foo");
> > from("direct:foo").setRouteId("b").to("http:...");
> >
> > And instead of getting something like
> > Created a
> > Completed a
> > Created b
> > Completed b
> >
> > I receive something like
> > Created a-null
> > Created a-a
> > Completed a-a
> > Completed a-a
> >
> > Any idea why it behaves like this and what I can do?
> >
> > Thanks
> > Henri
>
> You should likely only react to created / completed events. And that
> is why you may get a null in the from route.
> And when you use the direct component its NOT creating a new Exchange
> but routing the existing exchange.
> And hence why you wont see events for creating / completed from route b.
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>


Re: Camel and Perf4j

2013-03-15 Thread Claus Ibsen
On Fri, Mar 15, 2013 at 12:48 PM, Henri Tremblay
 wrote:
> Hi,
>
> I would like to use Camel with Perf4j.
>
> I know that Camel JMX already provide statistics but I would like to be
> able to easily see at once all my routes performance and be able generate
> nice graph. Perf4j allows me to do that quickly (you know another tool that
> will do the same with Camel?)
>

Yes hawtio can monitor Camel apps. I suggest to take a look.
In the upcoming 1.1 release there is going to be a new plugin for
showing stats, us
http://hawt.io/

And there is also a tool called CamelWatch
http://sksamuel.github.com/camelwatch/



> My first try was to extend EventNotifierSupport and react
> to ExchangeCreatedEvent and ExchangeCompletedEvent. Basically this:
>
>   public void notify(EventObject event) throws Exception {
> Exchange exchange = (Exchange) event.getSource();
> String tag = exchange.getFromRouteId() + "-" +
> exchange.getFromEndpoint();
> if (event instanceof ExchangeCreatedEvent) {
>   StopWatch watch = new Slf4JStopWatch(tag);
>   exchange.setProperty(STOP_WATCH_KEY + tag, watch);
> } else if (event instanceof ExchangeCompletedEvent) {
>   StopWatch watch = (StopWatch) exchange.removeProperty(STOP_WATCH_KEY
> + tag);
>   watch.stop();
> }
>   }
>
> Of course it doesn't really work. There is no way to have the route id it
> seems. Or at least I have strange result. My routes are:
>
> from("sql:...").setRouteId("a").to("direct-foo");
> from("direct:foo").setRouteId("b").to("http:...");
>
> And instead of getting something like
> Created a
> Completed a
> Created b
> Completed b
>
> I receive something like
> Created a-null
> Created a-a
> Completed a-a
> Completed a-a
>
> Any idea why it behaves like this and what I can do?
>
> Thanks
> Henri

You should likely only react to created / completed events. And that
is why you may get a null in the from route.
And when you use the direct component its NOT creating a new Exchange
but routing the existing exchange.
And hence why you wont see events for creating / completed from route b.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


How to escape commas(,) in CSV file

2013-03-15 Thread sarfaraj
Hi,

I have csv file with following data

"ID","NAME","ADDR"
"1","Sarfaraj Sayyad","Pune,India"

I am using camel csv component here and generate the resultant csv's 
But what happened it created four columns

1,Sarfaraj Sayyad,Pune,India

It should be like 1,Sarfaraj Sayyad,"Pune,India"

Can some one tell me how to escape comma in camel csv component.




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-escape-commas-in-CSV-file-tp5729241.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel and Perf4j

2013-03-15 Thread Henri Tremblay
Hi,

I would like to use Camel with Perf4j.

I know that Camel JMX already provide statistics but I would like to be
able to easily see at once all my routes performance and be able generate
nice graph. Perf4j allows me to do that quickly (you know another tool that
will do the same with Camel?)

My first try was to extend EventNotifierSupport and react
to ExchangeCreatedEvent and ExchangeCompletedEvent. Basically this:

  public void notify(EventObject event) throws Exception {
Exchange exchange = (Exchange) event.getSource();
String tag = exchange.getFromRouteId() + "-" +
exchange.getFromEndpoint();
if (event instanceof ExchangeCreatedEvent) {
  StopWatch watch = new Slf4JStopWatch(tag);
  exchange.setProperty(STOP_WATCH_KEY + tag, watch);
} else if (event instanceof ExchangeCompletedEvent) {
  StopWatch watch = (StopWatch) exchange.removeProperty(STOP_WATCH_KEY
+ tag);
  watch.stop();
}
  }

Of course it doesn't really work. There is no way to have the route id it
seems. Or at least I have strange result. My routes are:

from("sql:...").setRouteId("a").to("direct-foo");
from("direct:foo").setRouteId("b").to("http:...");

And instead of getting something like
Created a
Completed a
Created b
Completed b

I receive something like
Created a-null
Created a-a
Completed a-a
Completed a-a

Any idea why it behaves like this and what I can do?

Thanks
Henri


from webservice to queue

2013-03-15 Thread takidean
Hi 
i have to receive an external webservice and route it into a jms queue this
, is that useful

public void configure() throws Exception {
// TODO Auto-generated method stub
from("cxf://http://localhost:9000/order/";)
.setBody(constant("ok"))
.to("jms:xmlorders");

}}




--
View this message in context: 
http://camel.465427.n5.nabble.com/from-webservice-to-queue-tp5729239.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Consuming from an FTP windows

2013-03-15 Thread akcameluser
Hi Barerel

Thank you for your comment. Actually, the thread you have provided helped me
in constructing the directory path. I also found out that I was using an
external IP address as opposed to an internal one cause the camel component
is running internally.

Many thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Consuming-from-an-FTP-windows-tp5729197p5729238.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Multi CamelContext : getComponent called in configure() break some initialization

2013-03-15 Thread Fladnag
Hi,

I have a strange behavior when I call CamelContext.getComponent() on
RouteBuilder.configure() method in a blueprint bundle with 2 camel context :
*camel:list-contexts* list only one context

I also don't understand why component are linked to a Camel Context.
With 2 camel context, "shared" components are registered with the last Camel
Context.



Blueprint file with 2 camel context :


MultiCamelContextGetComponent.java :


/Without the call of *getComponent*()/ :
A) The 2 contexts are visible in karaf :


B) The 2 component (amq, amq2) are registered in ctx2 :


This can also be seen in JMX Console at org.apache.camel ->
computer_name/ctx1 -> components

/With the call of *getComponent*()/ (adding simple file bug.camel.cfg with
active.bug=true in etc folder and reload bundle):
A) Only one context is visible in karaf :


B) The 2 components (amq, amq2) are registered in ctx1 on context load and
then in ctx2 :


C) The JMX console was strange :
- On ctx1, we found amq & amq2, but with CamelId = ctx2
- On ctx2, we have no components !

D) In Karaf, ctx2 have the 2 components :


And the best for the end : in each case routes of ctx1 and ctx2 seems to
work !

Can I safely use more than one CamelContext in one Bundle ?

I have seen http://camel.apache.org/why-use-multiple-camelcontext.html where
they said to avoid that, but my application (SMX3/Camel 2.2.4, I'm trying to
migrate to SMX4) have ~50 CamelContext (SU) but only 9 SA, and I don't want
to have more than 50 bundles...

The complete maven project is attached (3 files, 3Ko) :  bug.camel.rar
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/Multi-CamelContext-getComponent-called-in-configure-break-some-initialization-tp5729235.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to add HTTP Basic and Digest Auth on CXF component

2013-03-15 Thread liugang594 Liu
Hi All:

I'd like to know how I can put the HTTP Authorization Setting on CXF
component.

1. On Consumer Side, I want to reuse the setting of Server
2. On Producer Side, I want to attach the Auth Info (username/password/auth
type) when sending the request.

Thanks in advance.

-- 
Thanks
GangLiu
MSN: liugang_0...@hotmail.com
Skype: gang.liu.talendbj


Re: Camel 2.10.2 timer component does not fire at startup

2013-03-15 Thread Claus Ibsen
On Wed, Mar 13, 2013 at 8:56 PM, jerome  wrote:
> I am having indeed the same issue.
> How to make this fire as soon as the route starts and every 1800 seconds
> afterwards?
> From the documentation I was assuming this was the syntax to use:
>  uri="timer://scheduler?fixedRate=true&period=1800s&delay=0" />
> It does not work though
>

You would need to set the delay to a positive value, and not use 0.


>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-2-10-2-timer-component-does-not-fire-at-startup-tp5723232p5729141.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Performance problem uploading to remote FTP using Stream

2013-03-15 Thread Claus Ibsen
Hi

I added a debug logging that logs how long time it takes to upload the
file in Camel 2.11.
As well what input stream is being used as source.

Though in the trace logging below there is no logs about using a
charset, as you upload binary data.
Though if you force use a special charset then Camel would have to
read the stream and write with that charset,
which could be a reason for being slower. But there is nothing in your logs.


On Wed, Mar 13, 2013 at 6:35 PM, GarethHughes  wrote:
> The only options that I could see on the ftpClient
> http://commons.apache.org/proper/commons-net//apidocs/org/apache/commons/net/ftp/FTPClient.html
> 
> to adjust the buffer size are 'setBufferSize' and
> 'setSendDataSocketBufferSize'. I tried various combinations/values but
> nothing had any noticeable impact.  I Assume I am setting these
> appropriately in the URI?:
>
>
> .to("ftp:"+host.getUsername()+"@"+host.getAddress()+"/camel_hosts/"+host.getDirectory()+"/"+host.getHostName()+"/in"
> +
> "?password=" + 
> host.getPassword() +
> 
> "&tempFileName=../temp/${file:onlyname}" +
> "&binary=true" +
> "&ftpClient.dataTimeout=3000" 
> +
> "&ftpClient.bufferSize=8192" +
> 
> "&ftpClient.sendDataSocketBufferSize=8192" +
> "&stepwise=false")
>
> TRACE level logging was inconclusive (as least from my layman's point of
> view):
>
> 13/Mar/2013 17:31:47,795 [onsumer[outbound_files_DEVH11]] RemoteFileProducer
> TRACE Writing using tempNameFile:
> camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr
> 13/Mar/2013 17:31:47,795 [onsumer[outbound_files_DEVH11]] FtpOperations
> TRACE
> existsFile(camel_hosts/.//DEVH11/in/D0265_001_POC2_B_POC2_B_OPER_L.usr)
> 13/Mar/2013 17:31:47,983 [onsumer[outbound_files_DEVH11]] FtpOperations
> TRACE
> existsFile(camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr)
> 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] FtpOperations
> TRACE buildDirectory(camel_hosts\.\DEVH11\in\..\temp)
> 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] FtpOperations
> TRACE changeCurrentDirectory(/devh11)
> 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] FtpOperations
> TRACE Changing directory: /devh11
> 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] RemoteFileProducer
> TRACE About to write
> [camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr] to
> [Endpoint[ftp://devh11@devgw02/camel_hosts/.//DEVH11/in?binary=true&ftpClient.bufferSize=8192&ftpClient.dataTimeout=3000&ftpClient.sendDataSocketBufferSize=8192&password=**&stepwise=false&tempFileName=..%2Ftemp%2F%24%7Bfile%3Aonlyname%7D]]
> from exchange [Exchange[JmsMessage[JmsMessageID:
> ID:ukmdselk024-3936-1363195885202-1:2:1:2:1]]]
> 13/Mar/2013 17:31:48,217 [onsumer[outbound_files_DEVH11]] FtpOperations
> TRACE
> storeFile(camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr)
> 13/Mar/2013 17:31:48,217 [onsumer[outbound_files_DEVH11]] FtpOperations
> TRACE
> doStoreFile(camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr)
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Performance-problem-uploading-to-remote-FTP-using-Stream-tp5729125p5729135.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Files cannot be moved on FTP

2013-03-15 Thread Claus Ibsen
On Thu, Mar 14, 2013 at 8:31 PM, Lutter, Robin
 wrote:
> Hi Claus and Filippo,
>
> Christian Schäfer had already filled a bug for this issue
> https://issues.apache.org/jira/browse/CAMEL-6056
>
> I attached a patch at it.
>
> Regards Robin
>

Thanks for the patch. I am looking in that now.
I assume you have tested the patch on your system and have it working?


> -Ursprüngliche Nachricht-
> Von: Claus Ibsen [mailto:claus.ib...@gmail.com]
> Gesendet: Mittwoch, 13. März 2013 08:11
> An: users@camel.apache.org
> Betreff: Re: Files cannot be moved on FTP
>
> On Tue, Mar 12, 2013 at 8:36 PM, Lutter, Robin  
> wrote:
>> Hi Claus,
>>
>> i think the error is in method  FileUtil.isWindows() because it determines 
>> the separator char for client os and not for server os. The given setting 
>> for separator is ignored at this place.
>> I would suggest to change FtpOperations line 656  to path =
>> FileUtil.compactPath(path,
>> endpoint.getConfiguration().getSeparator());
>>
>> Should I fill an jira ticket for 2.11?
>>
>
> Yeah this sounds right, that if you have configured an separator as wither 
> unix or windows then we should use that from the configuration.
> If its AUTO we should not use any separator but leave the path slashes as is.
>
> Fell free to log a JIRA and attach a proposed patch.
>
>> Regards Robin
>> I think there is an similar thread from xuloo 'camel-ftp 2.10.4 fails to 
>> connect on windows'
>>
>> -Ursprüngliche Nachricht-
>> Von: Lutter, Robin
>> Gesendet: Montag, 11. März 2013 15:57
>> An: users@camel.apache.org
>> Betreff: AW: Files cannot be moved on FTP
>>
>> Hi Claus,
>>
>> We are already using stepwise=false.
>> This is the ftp-uri I have in my testcase:
>> from("ftp://"; + getFTPServerAddress() +
>> "/test?password=secret" +
>> "&ftpClient.dataTimeout=3&stepwise=false" +
>> "&passiveMode=true&binary=true" +
>> "&move=success&separator=UNIX" +
>> "&antInclude=FILE.TXT")
>> .log("${body}");
>>
>> Tracing file.remote turns out, that  FileUtil normalizePath is using
>> File.separator from local system and not the separator setting TRACE
>> org.apache.camel.component.file.remote.FtpOperations -
>> changeCurrentDirectory(/)
>> TRACE org.apache.camel.component.file.remote.FtpOperations - Changing
>> directory: \\
>>
>> With stepwise=true the extra escaped backslash is away:
>> TRACE org.apache.camel.component.file.remote.FtpOperations -
>> changeCurrentDirectory(/)
>> TRACE org.apache.camel.component.file.remote.FtpOperations - Changing
>> directory: \
>>
>> Regards Robin
>>
>> On Thu, Mar 7, 2013 at 12:04 AM, Claus Ibsen 
>> wrote:
>>> On Wed, Mar 6, 2013 at 12:05 PM, Lutter, Robin
>>  wrote:
 Hi Claus,

 we use ftp. Setting separator to UNIX doesn't help. Contrary the
>> error
 occurs earlier in process:

 WARN  org.apache.camel.component.file.GenericFileOnCompletion -
>> Caused
 by:
 [org.apache.camel.component.file.GenericFileOperationFailedException
 - File operation failed: 550 Failed to change directory.
  Cannot change directory to: \\. Code: 550]
 org.apache.camel.component.file.GenericFileOperationFailedException:
 File operation failed: 550 Failed to change directory.

 Strange: server log can still contains CWD \\

>>>
>>> Can you try with stepwise=false
>>> You can read more about this option at: http://camel.apache.org/ftp2
>>>
>>> And yeah looks like we should fix that double slash bug. It ought to
>> be a single slash.
>>>
>>> If you get this error all the time. Then feel free to enable TRACE
>> logging on org.apache.camel.component.file.remote
>>>
>>> Then we can possible use that to bettet understand what goes wrong.
>>>
>>>
>>>
 Regards Robin

 On Wed, Mar 6, 2013 at 11:23 AM, Claus Ibsen 
 wrote:
> On Wed, Mar 6, 2013 at 10:31 AM, Lutter, Robin
  wrote:
> > Hi Filippo Balicchia,
> >
> > i can confirm, that move works with camel-ftp 2.10.4 and apache
> > ftpserver project on windows maschine with JDK 1.6.0_33.
> > While running with ftp server under RHEL 6 move failed with
 errorcode
> > 550. Rename works with commandline.
> >
> > Logs from ftpserver:
> >>  CWD 2012120100.OML "550 Failed to change
> > directory."
> >>  CWD "\"
> > "550 Failed to change directory."
> >>  CWD \\
> > "550 Failed to change directory."
> >>  CWD "
> > "550 Failed to change directory."
> >
> > Differences in log between 2.10.2 and 2.10.4
> > 2.10.2: 2.10.4
> > CWD test/success CWD test/success
> > PWD   PWD
> > CWD /CWD \\
> >
> > Regards
> > Robin
>
> Are you using the ftp or sft

Re: Consume the same file

2013-03-15 Thread Claus Ibsen
On Thu, Mar 14, 2013 at 4:42 PM, Alberto Brosich
 wrote:
> On Wed, 2013-03-13 at 17:31 +0100, Claus Ibsen wrote:
>> On Wed, Mar 13, 2013 at 3:54 PM, Alberto Brosich
>>  wrote:
>> >
>> > Hi,
>> >
>> > I have to consume with the FTP component always the same file but only when
>> > its size changes.
>> > I read this in the documentation:
>> >
>> > Camel 2.11: To use a custom idempotent key. By default the absolute path of
>> > the file is used. You can use the File Language, for example to use the 
>> > file
>> > name and file size, you can do:
>> >
>> > idempotentKey=${file:name}-${file:size}
>> >
>> > Does it mean that I have to wait camel 2.11 to solve my problem?
>> >
>>
>> No, you can implement your own idempotent repository where you can do
>> your own logic for determining if a message is a duplicate or not.
>>
>> But yeah this is much easier out of the box in Camel 2.11 with that
>> new idempotentKey option.
>
> Many thanks.
>
> Any prevision about the release date of 2.11 (I mean weeks, months)?
>

See the talk on @dev mailing list about closing down on a Camel 2.11 release.
We are fixing the last bugs / issues and will work on releasing it
soon, I guess within a couple of weeks.


> Best regards
>
> Alberto
>
>>
>> > Regards
>> >
>> > Alberto
>>
>>
>>
>
>



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: doTry docatch slow down the execution

2013-03-15 Thread Christian Müller
Have a look at the following tests:
https://github.com/muellerc/apachecon-na-2013/tree/master/file-component/src/test/java/org/apache/cmueller/camel/apachecon/na2013

The are performance comparison between the different possibilities...

Best,
Christian

On Thu, Mar 14, 2013 at 12:53 AM, Raul Kripalani  wrote:

> So you append each invalid record to a file (direct:AEDFormatException).
>
> For *each* rejected line, this process occurs: the FileInputStream is
> opened, positioned at the end, the line is written, the
> FileInputStream is closed. That could explain some of the slowness.
>
> Let's gather some performance stats for this endpoint. You have 2 options:
>
> - JMX => within the "processors" subtree you'll find a SendProcessor
> MBean associated with this file endpoint. Check its attributes.
> - Performance stats processors before and after the endpoint: 1)
> before: place a processor that saves System.currentTimeMillis() in an
> Exchange property, and 2) after: print to a log file the difference
> between now and the saved property.
>
> Please share your findings.
>
> Raúl Kripalani
> Apache Camel Committer | Enterprise Architect,
> Program Manager, Open Source Integration specialist
> http://about.me/raulkripalani |
> http://www.linkedin.com/in/raulkripalani | http://blog.raulkr.net |
> twitter: @raulvk
>



--


Re: (Camel 2.2) Exception handling problem in case of parallel splitter with custom AggregationStrategy

2013-03-15 Thread khar
Hi!

Thank you for your answer. Currently I can't change to newr version of
Camel, becase other modules depend on that version also. If you could please
tell me if there's any workaround I would be very grateful.

Thanks!
Mikolaj



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-2-Exception-handling-problem-in-case-of-parallel-splitter-with-custom-AggregationStrategy-tp5729205p5729226.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Question on Splitter Parallel Processing

2013-03-15 Thread Claus Ibsen
On Thu, Mar 14, 2013 at 7:09 PM, Edwin  wrote:
> Hi Folks,
>
> I have a route using a Splitter with parallel processing enabled. The
> exchange contains List someObjectList and the size of
> someObjectList is five.
>
> SomeObject contains a property - *id* If the first two elements of the list
> contain the same id, is it possible to process these on the same thread
> (i.e. these two elements are sticky to a certain thread) while the other
> three elements are processed on separete threads?
>
> Any insights are much appreciated.
>

I would pre process the message body before hitting the splitter.
eg there you can put together those elements that belong together. eg
in your case 5 elements in the list.
And then put 1+2 together, so the output list has 4 elements.




> Thanks,
> Edwin
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Question-on-Splitter-Parallel-Processing-tp5729204.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


oracle.jms.AQjmsFactory and javax.sql.DataSource

2013-03-15 Thread jinaLu
How to specify javax.sql.DataSource for oracle.jms.AQjmsFactory?
I'm using blueprint.

Thanks in advance



--
View this message in context: 
http://camel.465427.n5.nabble.com/oracle-jms-AQjmsFactory-and-javax-sql-DataSource-tp5729223.html
Sent from the Camel - Users mailing list archive at Nabble.com.