Re: stream:file closeOnDone not close all time

2013-05-15 Thread Claus Ibsen
I have updated the wiki docs. Though we could improve the stream component to auto close the stream when the exchange is done at the end of routing as a fallback. Then your use-case with writing to 2+ files can be supported, as all the streams is closed when the routing is done at the end. This r

Re: Why dead letter channel doesn't work after adding Processor to onException?

2013-05-15 Thread Franz Paul Forsthofer
Hi Rafal, please try handled(false); My understanding is that then the error handler is called. However, I do not understand why the first example with handled(true) works. Regards Franz Forsthofer -- SAP AG e-mail: franz.forstho...@sap.com On Tue, May 14, 2013 at 10:53

Re: stream:file closeOnDone not close all time

2013-05-15 Thread Claus Ibsen
Hi That is because you do write to 2 files. The option was intended for writing to the same file. On Thu, May 16, 2013 at 7:43 AM, Jean Francois LE BESCONT wrote: > Hi, > > what should I do ? > > Thanks > > Jeff > > > 2013/5/15 Jean Francois LE BESCONT > >> Hey ! >> >> A new option is availa

Re: Camel-mongodb with Scala and JndiRegistry

2013-05-15 Thread Claus Ibsen
Hi Ah yeah I am pretty sure you are not the only one who went down wrong with var/val/def in Scala. On Thu, May 16, 2013 at 12:09 AM, Sven Richter wrote: > Well, like i said i am fairly new, instead of using val for variables > i used "def", which is a very stupid mistake. > This code works:

Re: Removing route stops other routes from the same producer

2013-05-15 Thread ikoblik
I realized that I didn't ask the question... I want to implement Observer/Observable pattern with ability to subscribe and unsubscribe. I was looking for better ways to do this with Camel, but it seems that adding and removing routes is the only way. Has anyone solved this problem before? What did

Re: stream:file closeOnDone not close all time

2013-05-15 Thread Jean Francois LE BESCONT
Hi, what should I do ? Thanks Jeff 2013/5/15 Jean Francois LE BESCONT > Hey ! > > A new option is available for the stream:file to close it when done > (closeOnDone). This option is appeared in 2.11 after my jira ( > https://issues.apache.org/jira/browse/CAMEL-6147) > > File unlock (or relea

Re: when calling ejb cliiebt using ejb component of camel two string parameter method is called but in ejb the parameter'svalue is not printed instead string class (type of parameter)is printed

2013-05-15 Thread RUPA JAIN
when calling two string parameters method of ejb using ejb component of camel , the method is called but when I am trying to fetch parameters inside ejb bean method parameter's value is not fetched instead type of parameter(string class)is fetched and second parameter is nullified. Bean met

Netty to ActiveMQ - replies

2013-05-15 Thread asp
Hi, I am a first time camel user and would like to know how to proceed with setting up the camel route for my case. 1. I have a netty consumer where I receive messages from a non-netty TCP client 2. I have to forward the request to Active MQ 3. I have to respond back (send ACK ) to the non-net

Re: What is the best approach to do an "asynchronous rendezvous"?

2013-05-15 Thread Chris Wolf
Hello Raúl, The more I analyze the requirements, the more complicated it seems to get - it's looking like I need to have a per-customer state machine to manage the flow. To answer your questions: >- How many batches per day will you receive per customer? one per day per customer - 3 prede

Re: when calling ejb cliiebt using ejb component of camel two string parameter method is called but in ejb the parameter'svalue is not printed instead string class (type of parameter)is printed

2013-05-15 Thread Christian Müller
I didn't get it. Please have a look at http://camel.apache.org/support.htmlan provide the required details. Sent from a mobile device Am 15.05.2013 18:19 schrieb "RUPA JAIN" : > when calling two string parameters method of ejb using ejb component of > camel , the method is called but in jdev'l

Re: Camel-mongodb with Scala and JndiRegistry

2013-05-15 Thread Sven Richter
Well, like i said i am fairly new, instead of using val for variables i used "def", which is a very stupid mistake. This code works: val reg = new SimpleRegistry() val connectionBean = new Mongo("localhost", 27017) reg.put("myConnection", connectionBean) val camelContext = new DefaultCamelC

Re: What is the best approach to do an "asynchronous rendezvous"?

2013-05-15 Thread Raul Kripalani
Let me try and understand the timeline of these events. I will call a logical grouping of events "event batch". If you don't mind answering the following questions, I can assist better: - How many batches per day will you receive per customer? - Can the event batches interleave? - What id

Re: What is the best approach to do an "asynchronous rendezvous"?

2013-05-15 Thread Chris Wolf
Raúl, Thanks for your ideas. Now it's 3 events without guaranteed order to arrive before triggering the fourth event. As for correlation key, I guess it would be customer-id plus a timestamp that shows the event happened in the last several hours. The more I look into it, the more it seems like

Re: What is the best approach to do an "asynchronous rendezvous"?

2013-05-15 Thread Raul Kripalani
Hi Chris, I like this kind of problems ;-) Do these two messages share a correlation key? If yes, you can create a bean which acts like a Repository, accumulating message bodies or Exchanges under the correlation key. Could be implemented using Guava's MultiMap, or a DB if you need durable persis

Re: Why do Camel core methods still throw Checked Exceptions (everyone agrees they're 'bad' now, right?)

2013-05-15 Thread Hadrian Zbarcea
FWIW, +1 Pat (my personal opinion). My explanation, legacy stuff. Hopefully it'll be addressed in 3.0. Backward compatibility will really be a serious issue. Hadrian On 05/15/2013 01:57 PM, pmcb55 wrote: Hi Christian, Thanks for the reply. Basically the issue with Camel throwing Checked Ex

Re: Why do Camel core methods still throw Checked Exceptions (everyone agrees they're 'bad' now, right?)

2013-05-15 Thread pmcb55
Hi Christian, Thanks for the reply. Basically the issue with Camel throwing Checked Exceptions is that my code now has to declare those Checked Exceptions, which I concern just 'noise' (i.e. they add no value to my code, and now my Unit tests are infected with 'throws Exception' clauses that they

What is the best approach to do an "asynchronous rendezvous"?

2013-05-15 Thread Chris Wolf
In my process, I have two events that must be completed before the third can proceed. One event is the arrival of a certain JMS message and the other is the arrival of a certain file type. The problem is, I cannot represent this in a route pipeline because one event may occur before the other and

Re: Numbers of lines in a flat file

2013-05-15 Thread Baalu
thanks for responding... I was able to get it from header. thanks! -- View this message in context: http://camel.465427.n5.nabble.com/Numbers-of-lines-in-a-flat-file-tp5732455p5732625.html Sent from the Camel - Users mailing list archive at Nabble.com.

Using camel-bindy manually from within a processor on a single record

2013-05-15 Thread cwhistler
In my route processor, I am extracting some data from a database into a POJO. I need to send a record to another utility but the utility requires a comma-delimited string. I would like to use camel-bindy directly to have it parse my POJO so I can pass the results to the utility class. I then hav

Exception Handling Scenario - Suggestions Needed

2013-05-15 Thread Jothi
Camel Users: I have the following route: from("activemq:{{in.queue}}") .process(new MyInputProcessor()) .beanRef("myBeanProcessor") .process(new MyOutputProcessor()") .to("activemq:{{out.queue}}"); In my beanRef, I change the body of the Exchange to a different type after proce

when calling ejb cliiebt using ejb component of camel two string parameter method is called but in ejb the parameter'svalue is not printed instead string class (type of parameter)is printed

2013-05-15 Thread RUPA JAIN
when calling two string parameters method of ejb using ejb component of camel , the method is called but in jdev'log parameter's value is not printed instead string class (type of parameter)is printed. -- View this message in context: http://camel.465427.n5.nabble.com/when-calling-ejb-cliieb

Re: Query on Multiple Producers & one consumer (use of throttling)

2013-05-15 Thread deepak_a
Hi, I have been reading about load-balancing in camel. http://camel.apache.org/load-balancer.html This makes sense when we intend to spread the load evenly to multiple consumers. i.e. one Producer (FROM end point) spreading load to multiple consumers (TO END POINTS) is there a way to create load

stream:file closeOnDone not close all time

2013-05-15 Thread Jean Francois LE BESCONT
Hey ! A new option is available for the stream:file to close it when done (closeOnDone). This option is appeared in 2.11 after my jira ( https://issues.apache.org/jira/browse/CAMEL-6147) File unlock (or released or closed) looks to doesn't works fine if last line is not passed to the endpoint Ex

Re: Problem from Java DSL to Spring DSL

2013-05-15 Thread Gary Liu
Thanks Claus! The following code works. request-${date:now:-MM-dd-HHmmssSSS} I still don't understand how the following Java DSL works, i mean "transform" part : from("cxf:bean:reportIncident") .co

Removing route stops other routes from the same producer

2013-05-15 Thread ikoblik
Hi All, I'm having problems with vm: in multicast mode where if I stop one of the routes it will stop all the routes in the same MulticastProcessor. I've attached a test file that reproduces this. Normally you should see 100 messages being printed to stdout. I noticed that after removing route2 i

Solved: Logging cause of failure with deadLetterChannel error handler?

2013-05-15 Thread Peter Hilton
On 14 May 2013, at 18:10, Peter Hilton wrote: > I have a route that takes a file, parses it and then sends JSON to a web > service. If the Camel processor that parses the file throws a parse > exception, the configured error handler moves the file to the dead letter > endpoint. This much works.

Query on Multiple Producers & one consumer (use of throttling)

2013-05-15 Thread deepak_a
Hi, In our system, Camel produces JMS messages from integrated endpoints, which are consumed by EJB MDBs. The EJB application in-turn produces new JMS messages, which are consumed by Camel to send to other integrated endpoints (eg. WebSphere MQ). We use transacted routes, and Atomikos as XA

Re: How to create a generic SOAP consumer?

2013-05-15 Thread Smith-John
Hi, I'm using Equinox. I checked all my bundles for exporting javax.xml.ws. But I only found one: jaxws-api-osgi2.2.8.jar. This was added because cxf-rt-frontend-jaxws-2.7.3.jar needed the javax.xml.ws things. But I found out that javax.xml.ws is already part of the system library (I'm using jdk

RE: File component after polling should not move the file

2013-05-15 Thread Mohammad Shadab Ali
Thanks a ton Claus it works :) -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Wednesday, May 15, 2013 4:53 PM To: users@camel.apache.org Subject: Re: File component after polling should not move the file Hi Look at the other options on that link. There is optio

Re: Making a route depend on multiple criteria

2013-05-15 Thread cwhistler
I'm a bit concerned about performance and memory management with enriching the existing route. That would in effect hold 2 files in memory wouldn't it? I think I will just configure that last route but not start it. I'll use the onCompletion API on the third route to start the fourth route. -

Re: File component after polling should not move the file

2013-05-15 Thread Claus Ibsen
Hi Look at the other options on that link. There is options to include files using a regular exp pattern, eg such as include=.* XMLINCF1.* On Wed, May 15, 2013 at 12:31 PM, Mohammad Shadab Ali wrote: > Thanks a lot Claus it works. > > Another doubt: > I want to poll files having specific name

RE: File component after polling should not move the file

2013-05-15 Thread Mohammad Shadab Ali
Thanks a lot Claus it works. Another doubt: I want to poll files having specific name pattern, say "XMLINCF1", i.e. I want to poll only those files having "XMLINCF1" string in filename. Please suggest. -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Wednesday

Re: Logging cause of failure with deadLetterChannel error handler?

2013-05-15 Thread Peter Hilton
On 14 May 2013, at 18:10, Peter Hilton wrote: > … > > val deadLetterErrorHandler = > deadLetterChannel(failureEndpoint).disableRedelivery() > deadLetterErrorHandler.setFailureProcessor(ErrorProcessor()) > errorHandler(deadLetterErrorHandler) > > This is okay, but I would

Re: ProducerTemplate with Redelivery Policy

2013-05-15 Thread Darwish
Thanks Claus , i start new route ( from direct point ) and mark that route as transacted ( require new ) , i expect that each exchange will commit when the new route end successfully ,but that not happening!, when i used seda point , its commit each exchange individually . is this normal ?

Passing a list of parameters in SQL endpoint

2013-05-15 Thread Shishir
We are using IN clause and need to supply "," delimited list of values to the query. So we have used a single # and the expectation is that, the entire list should be replaced. Tried to pass # as String String list, named parameter, but it seems camel breaks every "," in value and try to find t

Using pre-allocated Exchange with Proxy

2013-05-15 Thread helander
When I use a camel proxy, e.g. via a ProxyBuilder, I have not found any way that my proxy client could inject additional (properties or message headers) to the Exchange that will be used. The things I would like to inject is only available at the client so it cant't be injected further down the rou

Re: How to create a generic SOAP consumer?

2013-05-15 Thread Smith-John
Hi, I'm using Equinox. Regards. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732584.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: File component after polling should not move the file

2013-05-15 Thread Claus Ibsen
Hi Yes see the options in the consumer table at http://camel.apache.org/file2 There is a noop option On Wed, May 15, 2013 at 9:42 AM, Mohammad Shadab Ali wrote: > Hi, > > I have a requirement where we want to poll a read-only directory using file > component, so creating of .camel folder and m

File component after polling should not move the file

2013-05-15 Thread Mohammad Shadab Ali
Hi, I have a requirement where we want to poll a read-only directory using file component, so creating of .camel folder and moving of file to .camel folder will not be allowed. Is there an option available in file component that it should not move or delete the file from the polling directory.