Re: Re: Camel Bindy: parse a BigDecimal number with a given pattern

2014-08-21 Thread Charles Moulliard
For your information, the "pattern" is not relevant when we use BigDecimalFormat or DoubleFormat. My idea is to propose to add an attribute to specify the groupSeparator and replace the separator by empty string "" Example: We get 123,456,999.00 --> we transform to 125456999.00 before to create th

Re: Component singleton for all routes

2014-08-21 Thread martin11
You are right Claus. MyComponent extends DefaultComponent and it is instanced only once but createProducer() on Endpoint is called for every thread. So this is the point of my issue. I have to resolve shared producer over all threads! It's clear to me now. Thanks -- View this message in contex

Re: Component singleton for all routes

2014-08-21 Thread Claus Ibsen
Make sure your producer either extends default producer or implements IsSingleton, so the isSingleton method returns true. On Thu, Aug 21, 2014 at 9:34 AM, martin11 wrote: > You are right Claus. > MyComponent extends DefaultComponent and it is instanced only once but > createProducer() on Endpoin

Re: Re: Camel Bindy: parse a BigDecimal number with a given pattern

2014-08-21 Thread Charles Moulliard
Here is what I suggest to implement in Camel Bindy --> https://www.dropbox.com/s/vlv3l3icwtowqs2/Screenshot%202014-08-21%2010.23.37.png?dl=0 There are 2 approaches, one using a Pattern and the other without the pattern. Until now, I don't know which one is the best and which one should be favoured

Re: Component singleton for all routes

2014-08-21 Thread martin11
Yes, isSingleton of MyProducer returns 'true' but ProducerCache in camel core is new instance for every thread and then createProducer() is called once per thread. -- View this message in context: http://camel.465427.n5.nabble.com/Component-singleton-for-all-routes-tp5755446p5755474.html Sent f

Re: Component singleton for all routes

2014-08-21 Thread Claus Ibsen
Hi Well then you do something not right in your "thread code". There should be 1 camel context which you use, and get the producer from. On Thu, Aug 21, 2014 at 10:30 AM, martin11 wrote: > Yes, isSingleton of MyProducer returns 'true' but ProducerCache in camel core > is new instance for every t

Re: Component singleton for all routes

2014-08-21 Thread martin11
There is my test context: THREAD-1 THREAD-2 -- View this messa

Re: Routing based on exchange header content-type

2014-08-21 Thread Harald Neiss
Hi On 21 Aug 2014, at 08:18, Claus Ibsen wrote: > Hi > > You can use tracer to see the messages details during routing and see > what headers you have > http://camel.apache.org/tracer Thanks for the reference! I added the trace attribute to the route (see below). > Also mind that maybe the co

Re: Re: Re: Camel Bindy: parse a BigDecimal number with a given pattern

2014-08-21 Thread a_blithe
I personally can work with both approaches, but I prefer the pattern approach a bit more. The reason is that the pattern helps to understand how the numbers looks like without seeing the numbers itself. Also I guess it is more reasonable to let DecimalFormat handle the number rather than fixing

Re: Re: Re: Camel Bindy: parse a BigDecimal number with a given pattern

2014-08-21 Thread Charles Moulliard
Code should contain tests to verify/validate that and throw exception if the matching is not perfect. For me the second appraoch with the pattern will require more code as we have to control the decimal / groupseparator with what is returned by the Locale ... On Thu, Aug 21, 2014 at 11:29 AM, wr

Re: Component singleton for all routes

2014-08-21 Thread martin11
Hi, I resolved my problem by static synchronised inner class in producer: public class MyProducer extends DefaultProducer { private static final Logger LOGGER = LoggerFactory.getLogger(MyProducer.class); public void process(Exchange exchange) throws Exception { // Test synchroni

RE: Problem encrypting the password using Camel Jasypt component

2014-08-21 Thread arvind
Hi All, As I am failed to do password encryption/decryption using camel Jasypt on the fly . I tried with my own Java bean class which does # reading the properties file. myproperties.properties - password= abc # changing the plain text to encrypted string and writin

Send SOAP response after acknowledging sent to queue

2014-08-21 Thread Jose María Zaragoza
Hi: I've got some questions about routes and CXF endpoint I've got a CXF endpoint to receive SOAP messages from a client . I need to process them and return a SOAP response But I've got 2 different scenarios: 1) I need to queue the SOAP response but I need to do it asynchronously I guess t

Re: Problem encrypting the password using Camel Jasypt component

2014-08-21 Thread Claus Ibsen
Hi Did you read the documentation about jasypt properties parser http://camel.apache.org/jasypt On Thu, Aug 21, 2014 at 12:20 PM, arvind wrote: > Hi All, > As I am failed to do password encryption/decryption using camel Jasypt on > the fly . I tried with my own Java bean class which does > # rea

Re: Problem encrypting the password using Camel Jasypt component

2014-08-21 Thread arvind
Hi Claus, I have started this discussion after following the link shared by you but could not able to decrypt on the fly and have explained all the reported issue , so finally wrote own bean class to do encryption/decryption and trying to find a way to inject decrypted value into the from uri for t

Async non-blocking IO with Camel VS request-scoped beans and logging MDC

2014-08-21 Thread Michael Bannii
Hi, I have a webservice internally calling a couple of other subordinate webservices. I'm trying to upgrade it to an async non-blocking way using Camel. So far it's route looks like this:

Which headers will be made available by the new camel rest component?

2014-08-21 Thread Knut-Håvard Aksnes
One of the problems with the camel-restlet component is that it doesn't provide easy access to http header parameters. Using JAX-RS this is as easy as using @QueryParam My question is really if the new service will offer something similar to what the JAX-RS annotations @MatrixParam, @QueryParam,

Default route EventNotifier

2014-08-21 Thread Alexey Markevich
Hello, Using Camel 2.13.2 I've found that my route already contains EventNotifier but with Camel 2.12.1 there was nothing. I checked change history but can't find regarding changes. Can anybody point me to this? -- Regards, Alexey.

Fwd: Getting cron expression in camel -Spring from system env

2014-08-21 Thread Rohan Roy
> Hi, > I have a camel quartz2 where I define the route as > > > > > > > CronScehdule is defined as > value="#{systemProperties[‘cron.schedule']}" /> >

Re: AW: Camel Custom Splitter Question

2014-08-21 Thread mattmadhavan
Hello Jan, Thank you very much for your reply. But this still does not solve my problem. The collection of Cancer records loaded from the DB has records from various cancer sites (Like Colon, Breast, Prostate ). The type of record is "*CancerRecord*" and the filed *PrimarySite *identifies the Cance

How to run "Tutorial on Spring Remoting with JMS" on two machines?

2014-08-21 Thread konkimalla
Hi, The following tutorial (Tutorial on Spring Remoting with JMS) works fine on one machine, but unable to run from two different machines (server on one and client on another machine). http://camel.apache.org/tutorial-jmsremoting.html#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMS

Running a delete query within a route

2014-08-21 Thread Matt Raible
I have a route that does a number of things: .process(lookupToHeadersProcessor) // 1) converts input parameters to headers .to("bean:myStoredProcedure") // 2) calls a stored procedure, that enters a record in a TEMP table and returns the ID .recipientList(simple("sql:select ret_string from TEMP "

How do I configure the ShutdownStrategy using Blueprint/OSGi?

2014-08-21 Thread Matt Sicker
I can't find anything anywhere about this, so I guess I have to ask here. I've got about ten different CamelContexts running in Karaf. After adding camel-disruptor, I've found that if I have to shut down Karaf, it hangs for five minutes before finally letting go. I saw that this is the default sett

org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "name" (Class org.codehaus.jettison.json.JSONObject), not marked as ignorable

2014-08-21 Thread Aryan
Hi All, I am using Karaf 3.0.0 to deploy my camel blueprint application which creates a rest route. I have exposed a rest service which accepts a org.codehaus.jettison.json.JSONObject in its paramater. @POST @Consumes(MediaType.APPLICATION_JSON) public void sayPlainTextHello(JSON

Re: How to run "Tutorial on Spring Remoting with JMS" on two machines?

2014-08-21 Thread Charles Moulliard
Hi, If the broker is well started, then it should expose the TCP (openwire) transport connector on the IP address/machine defined and a client should be able to connect to this machine. I suggest that you remove the VM Transport connector and make again a new test. You can verify that the transpor

Re: How do I configure the ShutdownStrategy using Blueprint/OSGi?

2014-08-21 Thread Claus Ibsen
Hi See http://camel.apache.org/advanced-configuration-of-camelcontext-using-spring.html On Fri, Aug 22, 2014 at 2:36 AM, Matt Sicker wrote: > I can't find anything anywhere about this, so I guess I have to ask here. > I've got about ten different CamelContexts running in Karaf. After adding > c

Camel Filter appears to delete files instead of leaving them be.

2014-08-21 Thread grimfury
Hi all, This task seems so easy and yet I can't get it done. The task is to look through the files in a directory and compress some which are older than a certain date, and leave the others untouched. I've attached all the code needed to run the test. The compression occurs but it deletes the oth

Re: Camel Filter appears to delete files instead of leaving them be.

2014-08-21 Thread Claus Ibsen
Use the noop=true to leave the file untouched. Camel moves the file to .camel by default. Check the file documentation http://camel.apache.org/file2 On Fri, Aug 22, 2014 at 8:38 AM, grimfury wrote: > Hi all, > This task seems so easy and yet I can't get it done. > > The task is to look through th