Re: Route removal triggers endpoint shutdown

2015-03-26 Thread Claus Ibsen
Hi

Check the release notes for 2.15 which has improvements in this area
http://camel.apache.org/camel-2150-release.html

On Thu, Mar 26, 2015 at 9:20 AM, Atanas Shindov
atanas.shin...@gmail.com wrote:
 2.12.1



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796p5764800.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Route removal triggers endpoint shutdown

2015-03-26 Thread Atanas Shindov
I guess you are referring to this entry:

Removing a route now also remove its static Endpoint's from the
EndpointRegistry (if those endpoints are not shared and used by other
routes). Mind that any dynamic endpoint created during routing from dynamic
EIPs such as recipient list, routing slip, dynamic router etc, are not
removed from the EndpointRegistry when the route is removed.

I will give it a try, thanks. :)



--
View this message in context: 
http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796p5764802.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Setting up CamelContext with Guice

2015-03-26 Thread dermoritz
My problem with camels built in guice was, i could not control the start of
the context. This happens as soon as guice begins - within the module you
are extending (calling run is not necessary).
So my alternate solution to use guice is: I extended
org.apache.camel.main.Main and injected my bound context there.
My main looks like this:

public class GuiceMain extends Main {

/**
 * Injected context.
 */
@Inject
private CamelContext context;

/**
 * Addes the main route that contains all others.
 */
@Inject
private RouteBuilder routes;

@Override
protected final CamelContext createContext() {
return context;
}

}

In this method you could also do aother things to prapre/set up the context
before returning it. With this nothing is started before you call
main.run().

so in my module (extends AbstractModule) i just added
bind(CamelContext.class).to(DefaultCamelContext.class).in(Singleton.class);

and my jndi.properties contains the default value:
java.naming.factory.initial =
org.apache.camel.util.jndi.CamelInitialContextFactory




--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-up-CamelContext-with-Guice-tp5764709p5764817.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Setting up CamelContext with Guice

2015-03-26 Thread dermoritz
i just created an ticket with a suggestion:
https://issues.apache.org/jira/browse/CAMEL-8555



--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-up-CamelContext-with-Guice-tp5764709p5764818.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Math operations with simple expression

2015-03-26 Thread angelo.rlcosta
hi guys, anyone know if in camel is possible to perform math operations like
sum and division with simple expression?

Thanks in advance



--
View this message in context: 
http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Math operations with simple expression

2015-03-26 Thread Claus Ibsen
Hi

No this is not possible and not the goal of that language. You can use
groovy / javascript etc instead

On Thu, Mar 26, 2015 at 11:09 AM, angelo.rlcosta
angelo.rlco...@gmail.com wrote:
 hi guys, anyone know if in camel is possible to perform math operations like
 sum and division with simple expression?

 Thanks in advance



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Route removal triggers endpoint shutdown

2015-03-26 Thread Atanas Shindov
2.12.1



--
View this message in context: 
http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796p5764800.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Route removal triggers endpoint shutdown

2015-03-26 Thread Claus Ibsen
What version of Camel do you use?

On Thu, Mar 26, 2015 at 8:40 AM, Atanas Shindov
atanas.shin...@gmail.com wrote:
 Hello,

 I have a custom singleton endpoint which manages a resource used by all
 consumers created by this endpoint. I open and close the resource in the
 start() and stop() methods of the endpoint assuming that this way I would
 prevent illegal states, i.e. the resource is closed, but a consumer is still
 active and tries to read it.

 However, I found out that Camel shutdowns an endpoint when a route is
 removed which reads from the endpoint. This is a problem when there are more
 than one routes reading from this endpoint as it results in the following
 sequence:

 [routes 1  2 are consuming from endpoint X]
 1. route 1 is removed
 - producer 1 is stopped.
 - consumer 1 is stopped.
 *2. endpoint X is stopped.*
 3. route 2 is still active and consumer 2 tires to access the closed
 resource.

 A comment above the
 ServiceHelper.stopAndShutdownServices(route.getEndpoint()) invocation inside
 the org.apache.camel.impl.RouteService.doShutdown() method where the
 shutdown happens says:

 // endpoints should only be stopped when Camel is shutting down
 // see more details in the warmUp method

 However, this is not the case. Is this a bug or I'm missing something?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


how to create @ManagedOperations at runtime

2015-03-26 Thread dermoritz
The use case is: I want expose a number of methods via jmx but the number of
methods is known at runtime - given by user settings (constant after start).

An alternate solution would be to expose a method that returns a list of
strings (the relevant user settings) and another method that has a string
parameter and accepts one of the strings from the first method. Because the
list is short - 5 strings at max - i would prefer to just expose one method
for each entry.

Is there a way to achieve this /at the end i want those methods to be found
in camel's jmx tree?



--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-create-ManagedOperations-at-runtime-tp5764816.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Math operations with simple expression

2015-03-26 Thread angelo.rlcosta
Thanks Claus.

Another question, i am looking at http://camel.apache.org/splitter.html and
thinking if its possible to split for example 100 items in to smaller chunks
of 10 items?

Any idea?

Regards,



--
View this message in context: 
http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819p5764822.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Route removal triggers endpoint shutdown

2015-03-26 Thread Atanas Shindov
Hi Claus,

I just checked the 2.15 code and it's the same:

/// endpoints should only be stopped when Camel is shutting down
// see more details in the warmUp method
ServiceHelper.stopAndShutdownServices(route.getEndpoint());/

Looks like you are still closing an endpoint on route removal?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796p5764821.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Math operations with simple expression

2015-03-26 Thread Morgan Hautman

Hi Angelo,

Could you split you're questions in different threads?
This is easier to follow and each thread is so problem specific.

Regards,
Morgan

On 26/03/2015 12:45, angelo.rlcosta wrote:

Thanks Claus.

Another question, i am looking at http://camel.apache.org/splitter.html and
thinking if its possible to split for example 100 items in to smaller chunks
of 10 items?

Any idea?

Regards,



--
View this message in context: 
http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819p5764822.html
Sent from the Camel - Users mailing list archive at Nabble.com.




Re: Math operations with simple expression

2015-03-26 Thread angelo.rlcosta
Ok Sure Morgan!


Ângelo Costa

On Thu, Mar 26, 2015 at 11:59 AM, Morgan.Hautman [via Camel] 
ml-node+s465427n5764823...@n5.nabble.com wrote:

 Hi Angelo,

 Could you split you're questions in different threads?
 This is easier to follow and each thread is so problem specific.

 Regards,
 Morgan

 On 26/03/2015 12:45, angelo.rlcosta wrote:

  Thanks Claus.
 
  Another question, i am looking at http://camel.apache.org/splitter.html and

  thinking if its possible to split for example 100 items in to smaller
 chunks
  of 10 items?
 
  Any idea?
 
  Regards,
 
 
 
  --
  View this message in context:
 http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819p5764822.html
  Sent from the Camel - Users mailing list archive at Nabble.com.



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819p5764823.html
  To unsubscribe from Math operations with simple expression, click here
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5764819code=YW5nZWxvLnJsY29zdGFAZ21haWwuY29tfDU3NjQ4MTl8OTY0MzQzODU=
 .
 NAML
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819p5764825.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Math operations with simple expression

2015-03-26 Thread Claus Ibsen
If you use tokenizer to split then it has a group option
http://camel.apache.org/splitter.html

On Thu, Mar 26, 2015 at 12:45 PM, angelo.rlcosta
angelo.rlco...@gmail.com wrote:
 Thanks Claus.

 Another question, i am looking at http://camel.apache.org/splitter.html and
 thinking if its possible to split for example 100 items in to smaller chunks
 of 10 items?

 Any idea?

 Regards,



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Math-operations-with-simple-expression-tp5764819p5764822.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Web Service Proxy to track incoming and outcoming messages

2015-03-26 Thread ercan.canlier
Hi to everybody,
First of all, many thanks for such a great framework that you implemented so
far.
It is extremely powerful and very fast. The documentation is quite in
detail.
I am implementing a web application for our integration tests.
I need to track incoming / outcoming messages to database.
For this, i can handle it via routing to bean and then show at my web page.
I have already read tutorials about cxf proxy, also read some camel's book
but things are not very clear.
I implemented one example, seems i am close to the solution but it is not
finished yet.
From my point of view, if the client sends request to the frontend service
which is proxy here, it should be forwarded to backend real service.
For instance: When user sends request to
http://localhost:8080/real-web-service, it must be forwarded to
http://localhost:8081/backend-web-service, isnt proxy working like that? By
forwarding the request, i must be able to track the messages.
On the other hand, i will publish web services dynamically when the user
load wsdl, how can i proxy them as well?
Should i use jetty at front and match them according to forwarding
properties? But like this, how can i proxy dynamically?
I hope you do understand the scenario and might give me some tips.
Thanks in advance.
Ercan



--
View this message in context: 
http://camel.465427.n5.nabble.com/Web-Service-Proxy-to-track-incoming-and-outcoming-messages-tp5764824.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Json Splitter

2015-03-26 Thread Minh Tran
Here you go.

split streaming=true
jsonpath$.[*]/jsonpath
….
/split

The json I feed into it is an array, e.g.  [ {…}, {….} ]

On 27/03/2015, at 3:08 PM, Reji Mathews contactr...@gmail.com wrote:

 Hi Minh
 
 Did you just say you made the json path work in camel splitter ?
 
 If so can u share ur splitter component cofig from the route file .
 
 Cheers
 Reji
 On 27 Mar 2015 02:56, Minh Tran darth.minhs...@gmail.com wrote:
 
 I can confirm jsonpath works in a splitter.
 
 On 27/03/2015, at 12:46 AM, Claus Ibsen [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=0 wrote:
 
 Hi
 
 I am not sure how far we got with jsonpath
 http://camel.apache.org/jsonpath
 
 But json path may support some kind of iterating json, and if it does
 we can use it in Camel.
 
 Maybe give it a try and check its docs what it can do
 https://code.google.com/p/json-path/
 
 On Thu, Mar 26, 2015 at 2:43 PM, Mark Webb [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=1 wrote:
 Not that I've seen.  I've had the need for this in the past.  Would
 make a
 nice new feature.
 
 On Wed, Mar 25, 2015 at 3:09 AM, contactreji [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=2 wrote:
 
 Hi
 
 Is there something out of the box in camel which can help me split
 json
 records?
 
 Regards
 Reji
 
 
 
 -
 Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache
 Camel
  Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739.html
 Sent from the Camel - Users mailing list archive at Nabble.com.
 
 
 
 
 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=3
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/
 
 
 
 --
 If you reply to this email, your message will be added to the discussion
 below:
 http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739p5764853.html
 To unsubscribe from Json Splitter, click here
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5764739code=Y29udGFjdHJlamlAZ21haWwuY29tfDU3NjQ3Mzl8MTAwNDkxODIzMw==
 .
 NAML
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
 



Re: Json Splitter

2015-03-26 Thread Reji Mathews
Hey that's cool. Let me try my luck and update !

Thanks Minh

Cheers
Reji
On 27 Mar 2015 09:48, Minh Tran darth.minhs...@gmail.com wrote:

 Here you go.

 split streaming=true
 jsonpath$.[*]/jsonpath
 
 /split

 The json I feed into it is an array, e.g.  [ {...}, {} ]

 On 27/03/2015, at 3:08 PM, Reji Mathews contactr...@gmail.com wrote:

  Hi Minh
 
  Did you just say you made the json path work in camel splitter ?
 
  If so can u share ur splitter component cofig from the route file .
 
  Cheers
  Reji
  On 27 Mar 2015 02:56, Minh Tran darth.minhs...@gmail.com wrote:
 
  I can confirm jsonpath works in a splitter.
 
  On 27/03/2015, at 12:46 AM, Claus Ibsen [hidden email]
  http:///user/SendEmail.jtp?type=nodenode=5764853i=0 wrote:
 
  Hi
 
  I am not sure how far we got with jsonpath
  http://camel.apache.org/jsonpath
 
  But json path may support some kind of iterating json, and if it does
  we can use it in Camel.
 
  Maybe give it a try and check its docs what it can do
  https://code.google.com/p/json-path/
 
  On Thu, Mar 26, 2015 at 2:43 PM, Mark Webb [hidden email]
  http:///user/SendEmail.jtp?type=nodenode=5764853i=1 wrote:
  Not that I've seen.  I've had the need for this in the past.  Would
  make a
  nice new feature.
 
  On Wed, Mar 25, 2015 at 3:09 AM, contactreji [hidden email]
  http:///user/SendEmail.jtp?type=nodenode=5764853i=2 wrote:
 
  Hi
 
  Is there something out of the box in camel which can help me split
  json
  records?
 
  Regards
  Reji
 
 
 
  -
  Reji Mathews
  Sr. Developer - Middleware Integration / SOA ( Open Source - Apache
  Camel
   Jboss Fuse ESB | Mule ESB )
  LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
  Twitter - reji_mathews
  --
  View this message in context:
  http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 
 
 
 
  --
  Claus Ibsen
  -
  Red Hat, Inc.
  Email: [hidden email]
  http:///user/SendEmail.jtp?type=nodenode=5764853i=3
  Twitter: davsclaus
  Blog: http://davsclaus.com
  Author of Camel in Action: http://www.manning.com/ibsen
  hawtio: http://hawt.io/
  fabric8: http://fabric8.io/
 
 
 
  --
  If you reply to this email, your message will be added to the discussion
  below:
  http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739p5764853.html
  To unsubscribe from Json Splitter, click here
  
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5764739code=Y29udGFjdHJlamlAZ21haWwuY29tfDU3NjQ3Mzl8MTAwNDkxODIzMw==
 
  .
  NAML
  
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
 
 




Re: Web Service Proxy to track incoming and outcoming messages

2015-03-26 Thread Willem Jiang
I think you can use CXF Interceptors[1][2] to trace the message[3], then you 
don’t need to build a proxy to interceptor all the message.
You can do some addition work base on CXF Logging Interceptor.

[1]https://cxf.apache.org/javadoc/latest/org/apache/cxf/interceptor/LoggingInInterceptor.html
[2]https://cxf.apache.org/javadoc/latest/org/apache/cxf/interceptor/LoggingOutInterceptor.html
[3]http://cxf.apache.org/docs/debugging-and-logging.html#DebuggingandLogging-LoggingMessages

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 26, 2015 at 10:29:09 PM, ercan.canlier (ercan.canl...@gmail.com) wrote:
 Hi Jiang,
 Actually, there is a web application where you will have possibility to
 publish web services.
 Client will load wsdl file and then i will be generating it via maven with
 help of camel.
 This step is clear and i have already finished it but i also want to track
 incoming and outgoing messages and log them to database. In order to do
 that, i think the only way is to proxy the real services and define endpoint
 consumers for them.
 Do you have any idea?
 Thanks for your interest.
 Best regards.
 Ercan
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Web-Service-Proxy-to-track-incoming-and-outcoming-messages-tp5764824p5764837.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Json Splitter

2015-03-26 Thread Reji Mathews
Hi Minh

Did you just say you made the json path work in camel splitter ?

If so can u share ur splitter component cofig from the route file .

Cheers
Reji
On 27 Mar 2015 02:56, Minh Tran darth.minhs...@gmail.com wrote:

 I can confirm jsonpath works in a splitter.

 On 27/03/2015, at 12:46 AM, Claus Ibsen [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=0 wrote:

  Hi
 
  I am not sure how far we got with jsonpath
  http://camel.apache.org/jsonpath
 
  But json path may support some kind of iterating json, and if it does
  we can use it in Camel.
 
  Maybe give it a try and check its docs what it can do
  https://code.google.com/p/json-path/
 
  On Thu, Mar 26, 2015 at 2:43 PM, Mark Webb [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=1 wrote:
  Not that I've seen.  I've had the need for this in the past.  Would
 make a
  nice new feature.
 
  On Wed, Mar 25, 2015 at 3:09 AM, contactreji [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=2 wrote:
 
  Hi
 
  Is there something out of the box in camel which can help me split
 json
  records?
 
  Regards
  Reji
 
 
 
  -
  Reji Mathews
  Sr. Developer - Middleware Integration / SOA ( Open Source - Apache
 Camel
   Jboss Fuse ESB | Mule ESB )
  LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
  Twitter - reji_mathews
  --
  View this message in context:
  http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 
 
 
 
  --
  Claus Ibsen
  -
  Red Hat, Inc.
  Email: [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=5764853i=3
  Twitter: davsclaus
  Blog: http://davsclaus.com
  Author of Camel in Action: http://www.manning.com/ibsen
  hawtio: http://hawt.io/
  fabric8: http://fabric8.io/



 --
  If you reply to this email, your message will be added to the discussion
 below:
 http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739p5764853.html
  To unsubscribe from Json Splitter, click here
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5764739code=Y29udGFjdHJlamlAZ21haWwuY29tfDU3NjQ3Mzl8MTAwNDkxODIzMw==
 .
 NAML
 http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



Re: Questions about JMS component and XA Transactions

2015-03-26 Thread gabfssilva
Thanks Thiago!

Answering my own question: I forgot to define the *maxPoolSize* property in
*AtomikosConnectionFactoryBean*, the default is 1, and when I set to a
higher value, everything works as expected.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Questions-about-JMS-component-and-XA-Transactions-tp5764849p5764865.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Route removal triggers endpoint shutdown

2015-03-26 Thread Claus Ibsen
Hi

You should favor to keep state on the component and then delegate from
endpoints on add/remove etc, then you can keep track of what are in
use and when there is no users of the resource, you can cleanup.

This is what other camel components does, such as seda / jetty etc.

On Thu, Mar 26, 2015 at 12:42 PM, Atanas Shindov
atanas.shin...@gmail.com wrote:
 Hi Claus,

 I just checked the 2.15 code and it's the same:

 /// endpoints should only be stopped when Camel is shutting down
 // see more details in the warmUp method
 ServiceHelper.stopAndShutdownServices(route.getEndpoint());/

 Looks like you are still closing an endpoint on route removal?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796p5764821.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Questions about JMS component and XA Transactions

2015-03-26 Thread gabfssilva
Hi! I'm trying to use the JMS component, which connects to a JBossMQ (it runs
on a JBoss 4.2.3GA :/ ) and I'm having some problems when I try to use XA
transactions (actually, even with local  transactions I get the same
behavior).
The problem is, when I try to set a Transaction Manager to a JMS Component,
the producers send the messages synchronously to the consumer, and I REALLY
don't want to do that. Even if there is no consumer, it takes about 10/11
seconds to commit the message, meanwhile the thread hangs.
But... If I DO NOT set any Transaction Manager to the JMS Component,
everything works as expected, I even get the same behavior like while you
don't commit to the database, don't send the message, but, still, it is not
XA so, it can happen to commit to the database and not be able to send the
message, is that right?
Is there a way to send a message with XA transactions using the JMS
Component asynchronously to the consumer? Is there a property that i'm
missing?

Here it is my JMS configuration:

https://gist.github.com/gabfssilva/c94f59f906d0c48e5001

And my JMS Component configuration:

https://gist.github.com/gabfssilva/60b6a9e42ed06945fe18

Waiting for answers, thanks!!




--
View this message in context: 
http://camel.465427.n5.nabble.com/Questions-about-JMS-component-and-XA-Transactions-tp5764849.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Questions about JMS component and XA Transactions

2015-03-26 Thread Thiago Kronig
Gabriel!
You and I work at the same company.
Contact me if you need help!

On Thu, Mar 26, 2015 at 3:12 PM gabfssilva gabfssi...@gmail.com wrote:

 Hi! I'm trying to use the JMS component, which connects to a JBossMQ (it
 runs
 on a JBoss 4.2.3GA :/ ) and I'm having some problems when I try to use XA
 transactions (actually, even with local  transactions I get the same
 behavior).
 The problem is, when I try to set a Transaction Manager to a JMS Component,
 the producers send the messages synchronously to the consumer, and I REALLY
 don't want to do that. Even if there is no consumer, it takes about 10/11
 seconds to commit the message, meanwhile the thread hangs.
 But... If I DO NOT set any Transaction Manager to the JMS Component,
 everything works as expected, I even get the same behavior like while you
 don't commit to the database, don't send the message, but, still, it is
 not
 XA so, it can happen to commit to the database and not be able to send the
 message, is that right?
 Is there a way to send a message with XA transactions using the JMS
 Component asynchronously to the consumer? Is there a property that i'm
 missing?

 Here it is my JMS configuration:

 https://gist.github.com/gabfssilva/c94f59f906d0c48e5001

 And my JMS Component configuration:

 https://gist.github.com/gabfssilva/60b6a9e42ed06945fe18

 Waiting for answers, thanks!!




 --
 View this message in context: http://camel.465427.n5.nabble.
 com/Questions-about-JMS-component-and-XA-Transactions-tp5764849.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



SFTP: RequiredAuthentications2

2015-03-26 Thread shreyas
Does camel support SFTP with RequiredAuthentications2 as provided in this link 
for auth: 
http://security.stackexchange.com/questions/17931/possible-to-use-both-private-key-and-password-authentication-for-ssh-login?

Thanks
Shreyas   

Re: Json Splitter

2015-03-26 Thread Mark Webb
Not that I've seen.  I've had the need for this in the past.  Would make a
nice new feature.

On Wed, Mar 25, 2015 at 3:09 AM, contactreji contactr...@gmail.com wrote:

 Hi

 Is there something out of the box in camel which can help me split json
 records?

 Regards
 Reji



 -
 Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel
  Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



simple string split / aggregate

2015-03-26 Thread Mark Lybarger
i'm looking to implement a simple string split and aggregate to learn
camel pattern implementations.

i have splitting on a space working but i can't see how to easily
reassemble the bits.  is there a way to do this without implementing a
custom aggregator strategy?

here's my main:

public static void main(String[] args) throws Exception {
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
   public void configure() {
   from(direct:inbound)
   .log(got message: ${body})
   .split(body().tokenize( ))
   .log(split: ${body})
   ;
   }
});
ProducerTemplate template = context.createProducerTemplate();

context.start();

for (int i = 0; i  10; i++) {
   template.sendBody(direct:inbound, Test Message:  + i);
}
}


Re: Json Splitter

2015-03-26 Thread Claus Ibsen
Hi

I am not sure how far we got with jsonpath
http://camel.apache.org/jsonpath

But json path may support some kind of iterating json, and if it does
we can use it in Camel.

Maybe give it a try and check its docs what it can do
https://code.google.com/p/json-path/

On Thu, Mar 26, 2015 at 2:43 PM, Mark Webb elihusma...@gmail.com wrote:
 Not that I've seen.  I've had the need for this in the past.  Would make a
 nice new feature.

 On Wed, Mar 25, 2015 at 3:09 AM, contactreji contactr...@gmail.com wrote:

 Hi

 Is there something out of the box in camel which can help me split json
 records?

 Regards
 Reji



 -
 Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel
  Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Apache Camel decodes HTTP query params and httpclient fails with Invalid query exception

2015-03-26 Thread Claus Ibsen
Hi

What version of Camel do you use?


On Thu, Mar 26, 2015 at 7:27 AM, Liliana.Neagul
liliana.iovanov...@gmail.com wrote:
 Hi,

 I'm trying to send from a camel route an HTTP request using an encoded query
 parameter (for symbol euro
 €), and it seems that camel decode the parameter and sent it to httpclient
 decoded. Httpclient fails then with 'Invalid query' exception.

 My route is:
 from(jetty:http://localhost:5443/getCurrency;)
  .setHeader(Exchange.HTTP_METHOD, constant(GET))
  .setHeader(Exchange.HTTP_URI, simple(Constants.PATH+
 /code=EURsymbol=%E2%82%ACplaces=2))
  .to(http://host;);

 When Camel constructs the URI object, from Exchange, the  query parameter
 'symbol' is decoded in '€'.

 Did someone succeed to pass encoded params? should I set some new headers to
 camel route?

 Thanks for your help,
 Liliana



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Apache-Camel-decodes-HTTP-query-params-and-httpclient-fails-with-Invalid-query-exception-tp5764794.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Apache Camel decodes HTTP query params and httpclient fails with Invalid query exception

2015-03-26 Thread Willem Jiang
Hi,

Did you try to setup the query parameter with the header name of 
Exchange.HTTP_QUERY?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 26, 2015 at 2:28:41 PM, Liliana.Neagul (liliana.iovanov...@gmail.com) 
wrote:
 Hi,
  
 I'm trying to send from a camel route an HTTP request using an encoded query
 parameter (for symbol euro
 €), and it seems that camel decode the parameter and sent it to httpclient
 decoded. Httpclient fails then with 'Invalid query' exception.
  
 My route is:
 from(jetty:http://localhost:5443/getCurrency;)
 .setHeader(Exchange.HTTP_METHOD, constant(GET))
 .setHeader(Exchange.HTTP_URI, simple(Constants.PATH+
 /code=EURsymbol=%E2%82%ACplaces=2))
 .to(http://host;);
  
 When Camel constructs the URI object, from Exchange, the query parameter
 'symbol' is decoded in '€'.
  
 Did someone succeed to pass encoded params? should I set some new headers to
 camel route?
  
 Thanks for your help,
 Liliana
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Apache-Camel-decodes-HTTP-query-params-and-httpclient-fails-with-Invalid-query-exception-tp5764794.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: simple string split / aggregate

2015-03-26 Thread Claus Ibsen
Hi

If you want to aggregate you would need to use one. The splitter has
that supported out of the box as the composed message processor eip

See the splitter only section
http://camel.apache.org/composed-message-processor.html

For aggregation strategy you can use pojos also with camel, so you can
implement that with fairly few lines of code. More details at
http://camel.apache.org/aggregator2


On Thu, Mar 26, 2015 at 2:39 PM, Mark Lybarger mlybar...@gmail.com wrote:
 i'm looking to implement a simple string split and aggregate to learn
 camel pattern implementations.

 i have splitting on a space working but i can't see how to easily
 reassemble the bits.  is there a way to do this without implementing a
 custom aggregator strategy?

 here's my main:

 public static void main(String[] args) throws Exception {
 CamelContext context = new DefaultCamelContext();
 context.addRoutes(new RouteBuilder() {
public void configure() {
from(direct:inbound)
.log(got message: ${body})
.split(body().tokenize( ))
.log(split: ${body})
;
}
 });
 ProducerTemplate template = context.createProducerTemplate();

 context.start();

 for (int i = 0; i  10; i++) {
template.sendBody(direct:inbound, Test Message:  + i);
 }
 }



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Web Service Proxy to track incoming and outcoming messages

2015-03-26 Thread Willem Jiang
Hi,

I guess you just want to create the proxy dynamically, maybe it is based on the 
request url or content, Am I right?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 26, 2015 at 9:27:57 PM, ercan.canlier (ercan.canl...@gmail.com) wrote:
 Hi to everybody,
 First of all, many thanks for such a great framework that you implemented so
 far.
 It is extremely powerful and very fast. The documentation is quite in
 detail.
 I am implementing a web application for our integration tests.
 I need to track incoming / outcoming messages to database.
 For this, i can handle it via routing to bean and then show at my web page.
 I have already read tutorials about cxf proxy, also read some camel's book
 but things are not very clear.
 I implemented one example, seems i am close to the solution but it is not
 finished yet.
 From my point of view, if the client sends request to the frontend service
 which is proxy here, it should be forwarded to backend real service.
 For instance: When user sends request to
 http://localhost:8080/real-web-service, it must be forwarded to
 http://localhost:8081/backend-web-service, isnt proxy working like that? By
 forwarding the request, i must be able to track the messages.
 On the other hand, i will publish web services dynamically when the user
 load wsdl, how can i proxy them as well?
 Should i use jetty at front and match them according to forwarding
 properties? But like this, how can i proxy dynamically?
 I hope you do understand the scenario and might give me some tips.
 Thanks in advance.
 Ercan
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Web-Service-Proxy-to-track-incoming-and-outcoming-messages-tp5764824.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Json Splitter

2015-03-26 Thread Minh Tran
I can confirm jsonpath works in a splitter.

On 27/03/2015, at 12:46 AM, Claus Ibsen claus.ib...@gmail.com wrote:

 Hi
 
 I am not sure how far we got with jsonpath
 http://camel.apache.org/jsonpath
 
 But json path may support some kind of iterating json, and if it does
 we can use it in Camel.
 
 Maybe give it a try and check its docs what it can do
 https://code.google.com/p/json-path/
 
 On Thu, Mar 26, 2015 at 2:43 PM, Mark Webb elihusma...@gmail.com wrote:
 Not that I've seen.  I've had the need for this in the past.  Would make a
 nice new feature.
 
 On Wed, Mar 25, 2015 at 3:09 AM, contactreji contactr...@gmail.com wrote:
 
 Hi
 
 Is there something out of the box in camel which can help me split json
 records?
 
 Regards
 Reji
 
 
 
 -
 Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel
  Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739.html
 Sent from the Camel - Users mailing list archive at Nabble.com.
 
 
 
 
 -- 
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/



Re: Route removal triggers endpoint shutdown

2015-03-26 Thread Claus Ibsen
Hi

But that said, we could likely take a look if we could detect if the
route endpoint is used by other routes, and avoid shutting it down, as
we have that logic for endpoints used within the route.

You are welcome to log a JIRA ticket then we can take a stab at improving this.

On Thu, Mar 26, 2015 at 9:31 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 You should favor to keep state on the component and then delegate from
 endpoints on add/remove etc, then you can keep track of what are in
 use and when there is no users of the resource, you can cleanup.

 This is what other camel components does, such as seda / jetty etc.

 On Thu, Mar 26, 2015 at 12:42 PM, Atanas Shindov
 atanas.shin...@gmail.com wrote:
 Hi Claus,

 I just checked the 2.15 code and it's the same:

 /// endpoints should only be stopped when Camel is shutting down
 // see more details in the warmUp method
 ServiceHelper.stopAndShutdownServices(route.getEndpoint());/

 Looks like you are still closing an endpoint on route removal?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796p5764821.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


SortTerm[] in Spring XML

2015-03-26 Thread camelvev
Hello!

This is probably stupidly simple, but: I'd like to use the new SortTerm[]
functionality with IMAP in Camel 2.15. 

I'm using spring xml to configure my bean bindings and want to refer to the
sort term (say, SortTerm.SUBJECT) by referring to a binding id in the
endpoint URI like this: sortTerm=#mySortTerm.

In the tests, you do this:

JndiRegistry jndi = super.createRegistry();
jndi.bind(sortAscendingDate, new SortTerm[]{SortTerm.DATE});

How do I create a simple binding to a SortTerm array using Spring XML? I've
tried creating a bean specifically for it, and using util:list and array
around the SortTerm, using value-type=com.sun.mail.imap.SortTerm , but I
always get some sort of type conversion error, typically 

No type converter available to convert from type: java.lang.String to the
required type: com.sun.mail.imap.SortTerm[] .

So the question is - How can I create a simple array of SortTerms in the
spring registry using Spring XML?

Thanks,
ovvo



--
View this message in context: 
http://camel.465427.n5.nabble.com/SortTerm-in-Spring-XML-tp5764866.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel File - Streaming

2015-03-26 Thread Claus Ibsen
Hi

Just use Camel's type converter to get the file as java.io.File or
FileInputStream etc.
http://camel.apache.org/type-converter.html

On Wed, Mar 25, 2015 at 7:11 PM, contactreji contactr...@gmail.com wrote:
 Can I stream a file's content into camel route using File Component?

 I have a huge json file which needs to be processed by a java logic inside a
 processor. How can I read the file and stream it as FileInputStream into my
 java processor?

 Cheers
 Reji



 -
 Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel  
 Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-File-Streaming-tp5764783.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Write Collection of FixedLengthRecord to Flat File

2015-03-26 Thread jayram7
I think I got a solution for this. I explicitly created a List of Map and
then marshalling it

ListMaplt;String, Object pojoListMap = new ArrayListMaplt;String,
Object();
MapString, Object pojoMap = null;
for(POJO pojo : pojoList) {
pojoMap = new HashMapString, Object(); 
pojoMap.put(pojo.getClass().getName(), pojo);
pojoListMap.add(pracMap);
}



--
View this message in context: 
http://camel.465427.n5.nabble.com/Write-Collection-of-FixedLengthRecord-to-Flat-File-tp5764720p5764786.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Hlep Please - TransactionErroHandler/retry/DLC issues. Stuck

2015-03-26 Thread mattmadhavan
Hello,
Anyone out there please?

Matt



-
Thanks
Matt G. Madhavan
--
View this message in context: 
http://camel.465427.n5.nabble.com/Hlep-Please-TransactionErroHandler-retry-DLC-issues-Stuck-tp5764363p5764782.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help with sequential, synchronous routes

2015-03-26 Thread Claus Ibsen
Hi

You can use control bus to control routes
http://camel.apache.org/controlbus

And related to that would be route policy
http://camel.apache.org/routepolicy.html



On Wed, Mar 25, 2015 at 5:48 PM, lancemethot
lance.met...@libertymutual.com wrote:
 Greetings,

 I am new to Camel, so forgive me if my terminology is not correct.

 I have a process that must perform the following work:

 - process 'new users'
 - process 'new customers'
 - process relationships between users and customers

 Processing relationships will fail unless the users and customers have
 already been processed.

 I have implemented the above using three separate Camel routes and the
 mybatis interface. An example route is:

  from(mybatis:fetchUserUpdates+
 ?statementType=SelectList+
 consumer.useIterator=true+
 consumer.routeEmptyResultSet=false+
 consumer.onConsume=updateLastUserProcessed+
 delay=5m)
.setHeader(TransmissionIdentifier, simple(${body?.getmUUID}))
.marshal(cdf)
.to(file:/request/+
   ?fileName=Request-${header.TransmissionIdentifier}.xml+
   doneFileName=${file:name}.{{trigger.extension}}+
   autoCreate=true+
   fileExist=Override)
.end();

 The customer and relationship routes are similar.

 I am only able to make use of mybatis consumer.useIterator and
 consumer.onConsume attributes if mybatis is invoked in the from method.
 These didn't seem to work when called from to()... which makes sense to me.
 I really like consumer.useIterator and consumer.onConsume, as it
 considerably simplifies the code.

 But how can I chain these three separate routes so that they process
 sequentially and synchronously? They are each firing on independent delays
 and there is no guarantee that the user and customer information is
 processed before relationships.

 I looked into direct() but didn't have much luck. Is there another way to
 define route dependencies or to chain producers?


 Thanks,
 Lance




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Help-with-sequential-synchronous-routes-tp5764776.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Apache Camel decodes HTTP query params and httpclient fails with Invalid query exception

2015-03-26 Thread Liliana.Neagul
Hi, 

I'm trying to send from a camel route an HTTP request using an encoded query
parameter (for symbol euro 
€), and it seems that camel decode the parameter and sent it to httpclient
decoded. Httpclient fails then with 'Invalid query' exception. 

My route is: 
from(jetty:http://localhost:5443/getCurrency;) 
 .setHeader(Exchange.HTTP_METHOD, constant(GET)) 
 .setHeader(Exchange.HTTP_URI, simple(Constants.PATH+
/code=EURsymbol=%E2%82%ACplaces=2)) 
 .to(http://host;); 

When Camel constructs the URI object, from Exchange, the  query parameter
'symbol' is decoded in '€'. 

Did someone succeed to pass encoded params? should I set some new headers to
camel route? 

Thanks for your help, 
Liliana



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-decodes-HTTP-query-params-and-httpclient-fails-with-Invalid-query-exception-tp5764794.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Setting up CamelContext with Guice

2015-03-26 Thread Willem Jiang
When you call the new InitialContext(); the camel context is started and it 
already loads the camel route, so it’s useless when setup the camel context 
after the camel context is started.

You can extend the GuiceCamelContext to apply some setting on the CamelContext 
inside the start method.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 25, 2015 at 2:30:40 AM, Jakub Kotowski (ja...@sindicetech.com) wrote:
 Hi,
  
 how do I setup CamelContext when I use Guice with the guiceyfruit JNDI
 provider?
  
 I followed this guide:
 http://blog.timmattison.com/archives/2014/10/27/building-apache-camel-applications-with-guice/
   
  
 Doing for example this:
  
 InitialContext context = new InitialContext();
 CamelContext camelContext = (CamelContext)
 context.lookup(CamelContext.class.getName());
 camelContext.setTracing(true); // no effect
 camelContext.addInterceptStrategy(new Tracer()); // no effect either
  
 has no effect. What is the proper way to do it?
  
 There was a similar question recently:
  
 http://camel.465427.n5.nabble.com/Where-to-do-context-setup-stuff-in-a-guice-enabled-camel-app-td5759574.html
   
  
 Thanks,
  
 Jakub
  



Route removal triggers endpoint shutdown

2015-03-26 Thread Atanas Shindov
Hello,

I have a custom singleton endpoint which manages a resource used by all
consumers created by this endpoint. I open and close the resource in the
start() and stop() methods of the endpoint assuming that this way I would
prevent illegal states, i.e. the resource is closed, but a consumer is still
active and tries to read it.

However, I found out that Camel shutdowns an endpoint when a route is
removed which reads from the endpoint. This is a problem when there are more
than one routes reading from this endpoint as it results in the following
sequence:

[routes 1  2 are consuming from endpoint X]
1. route 1 is removed
- producer 1 is stopped.
- consumer 1 is stopped.
*2. endpoint X is stopped.*
3. route 2 is still active and consumer 2 tires to access the closed
resource.

A comment above the
ServiceHelper.stopAndShutdownServices(route.getEndpoint()) invocation inside
the org.apache.camel.impl.RouteService.doShutdown() method where the
shutdown happens says:

// endpoints should only be stopped when Camel is shutting down
// see more details in the warmUp method

However, this is not the case. Is this a bug or I'm missing something?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Route-removal-triggers-endpoint-shutdown-tp5764796.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel decodes HTTP query params and httpclient fails with Invalid query exception

2015-03-26 Thread Liliana.Neagul
@Willem: Yes I tried to the parameter in Exchange.HTTP_QUERY header name. It
has the same behavior.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-decodes-HTTP-query-params-and-httpclient-fails-with-Invalid-query-exception-tp5764794p5764843.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Web Service Proxy to track incoming and outcoming messages

2015-03-26 Thread ercan.canlier
Hi Jiang,
Actually, there is a web application where you will have possibility to
publish web services.
Client will load wsdl file and then i will be generating it via maven with
help of camel.
This step is clear and i have already finished it but i also want to track
incoming and outgoing messages and log them to database. In order to do
that, i think the only way is to proxy the real services and define endpoint
consumers for them.
Do you have any idea?
Thanks for your interest.
Best regards.
Ercan



--
View this message in context: 
http://camel.465427.n5.nabble.com/Web-Service-Proxy-to-track-incoming-and-outcoming-messages-tp5764824p5764837.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Json Splitter

2015-03-26 Thread Preben.Asmussen
Or just convert json to a Map and iterate over that.

/Preben



--
View this message in context: 
http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739p5764844.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: REST DSL typo in webpage

2015-03-26 Thread Taariq Levack
Fixed, thanks for reporting and please feel free to edit the site as you go
along.

On Thu, Mar 26, 2015 at 4:16 PM, Mark Webb elihusma...@gmail.com wrote:

 First off, thanks for this feature.  It rocks.  I've used it a few times
 already.

 Near the bottom of the page http://camel.apache.org/rest-dsl, there's a
 typo in the section Enabling or disabling Jackson JSON features.   The
 XML code snippet has a few errors:

 1. bindingModel should be bindingMode
 2. the value for bindingMode is missing a closing double-quote.



Re: setup FTP producer scenario

2015-03-26 Thread jmhamm
I was trying to accomplish this same sort of functionality.  Is there a
specific min version that would allow us to write to one file and then
rename on completion?

The specifics behind mine were to have a route that pulled messages off of a
queue and append a file until a timer went off then the file would be
renamed to finalize the file.



--
View this message in context: 
http://camel.465427.n5.nabble.com/setup-FTP-producer-scenario-tp5764713p5764841.html
Sent from the Camel - Users mailing list archive at Nabble.com.


REST DSL typo in webpage

2015-03-26 Thread Mark Webb
First off, thanks for this feature.  It rocks.  I've used it a few times
already.

Near the bottom of the page http://camel.apache.org/rest-dsl, there's a
typo in the section Enabling or disabling Jackson JSON features.   The
XML code snippet has a few errors:

1. bindingModel should be bindingMode
2. the value for bindingMode is missing a closing double-quote.


Re: Apache Camel decodes HTTP query params and httpclient fails with Invalid query exception

2015-03-26 Thread Liliana.Neagul
I'm using apache-camel version 2.14.1 





--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-decodes-HTTP-query-params-and-httpclient-fails-with-Invalid-query-exception-tp5764794p5764842.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: REST DSL typo in webpage

2015-03-26 Thread Mark Webb
Will do.  I just checked any my account (from my MINA days) still works.

Thanks,
Mark


On Thu, Mar 26, 2015 at 11:03 AM, Taariq Levack taar...@gmail.com wrote:

 Fixed, thanks for reporting and please feel free to edit the site as you go
 along.

 On Thu, Mar 26, 2015 at 4:16 PM, Mark Webb elihusma...@gmail.com wrote:

  First off, thanks for this feature.  It rocks.  I've used it a few times
  already.
 
  Near the bottom of the page http://camel.apache.org/rest-dsl, there's a
  typo in the section Enabling or disabling Jackson JSON features.   The
  XML code snippet has a few errors:
 
  1. bindingModel should be bindingMode
  2. the value for bindingMode is missing a closing double-quote.