Camel in Action book

2013-05-16 Thread gquintana
Hello, I am new to Camel and learning it. Camel in Action book is 3 years old and based on Camel 2.5. - Is it still valuable and usable with current Camel 2.11? - Is there an update or another book announced? Thanks for advice. -- View this message in context: http://camel.465427.n5.nabble.c

Re: Camel in Action book

2013-05-17 Thread gquintana
Thanks for advice and feedback. Gérald -- View this message in context: http://camel.465427.n5.nabble.com/Camel-in-Action-book-tp5732685p5732722.html Sent from the Camel - Users mailing list archive at Nabble.com.

Endpoint URI typesafety

2013-06-01 Thread gquintana
Hi everyone, The Java DSL is very nice, but I wonder why endpoint URIs are not typesafe. Instead of we could write Even if it's more verbose, is there a technical reason for not doing this? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Endpoint-URI-typesafety-tp

Camel Mustache & Handlebars components

2013-06-08 Thread gquintana
Hi all, Just for the fun, I wrote Camel components using Mustache or Handlebars templating engines: https://github.com/gquintana/camel-stuff Cheers, Gérald -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Mustache-Handlebars-components-tp5734043.html Sent from the

Re: Camel Mustache & Handlebars components

2013-06-10 Thread gquintana
No these components won't help you, they work exactly like FreeMarker. On Mustache Java, I think you can customize the way your object graph is walked when rendering the template (see BaseObjectHandler). But the whole message must fit in memory. I produced theses components because I am using Hand

Re: Camel Mustache & Handlebars components

2013-06-18 Thread gquintana
n add a link to your components if you want to keep em at github > on this page > http://camel.apache.org/user-stories.html > > > > > On Sat, Jun 8, 2013 at 10:21 PM, gquintana <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5734241&i=0>> > w

Re: Camel Mustache & Handlebars components

2013-06-19 Thread gquintana
t the new generation of developers use. In > the old days we kinda only had Velocity. But today there is so many > new ones. > > > > On Tue, Jun 18, 2013 at 5:25 PM, gquintana <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5734334&i=0>> > wrote: >

RE: camelone 2013 Presentations and Video Sessions

2013-06-27 Thread gquintana
Hi, My personal bookmarks: http://macstrac.blogspot.fr/2013/06/introducing-apache-camel-based-open.html and http://vimeo.com/68442425 http://www.slideshare.net/search/slideshow?searchfrom=header&q=camelone+2013 Gerald -- View this message in context: http://camel.465427.n5.nabble.com/camelone

Re: Weblogic JMS Security Issues - A possible resolution

2013-07-03 Thread gquintana
Hi, I struggled against this one as well (I am happy not to be alone!), it's more related to WebLogic and Spring's DefaultMessageListenerContainer than Camel. My understanding is that, in WebLogic, the security context (who is sending/receiving messages) is bound to the thread getting the Connecti

Re: synchronization Camel and JFrame

2013-07-03 Thread gquintana
You shouldn't execute the Camel processing in Swing's Event DispatchThread. As the EDT is busy with processing it can't repaint the JFrame. Instead run Camel processing in background thread using a SEDA and then update the JFrame using SwingUtilities invokeLater. Or you could use a SwingWorker, rea

Re: logging to different (dynamic) appenders

2013-07-03 Thread gquintana
You could use the DynamicRouter EIP + dynamically built Log endpoints. -- View this message in context: http://camel.465427.n5.nabble.com/logging-to-different-dynamic-appenders-tp5735080p5735159.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Weblogic JMS Security Issues - A possible resolution

2013-07-04 Thread gquintana
Hi David, I don't understand why you say "I avoided any threading changes because I was concerned about its affect on transactions. " because this is actually what you're doing in WeblogicSecurityBean#runPrivilegedActionAsSubject: this piece of code is pushing/poping the security context in the th

Re: synchronization Camel and JFrame

2013-07-04 Thread gquintana
Yes. Gérald -- View this message in context: http://camel.465427.n5.nabble.com/synchronization-Camel-and-JFrame-tp5735155p5735178.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Weblogic JMS Security Issues - A possible resolution

2013-07-04 Thread gquintana
Thanks David. It's crystal clear now. -- View this message in context: http://camel.465427.n5.nabble.com/Weblogic-JMS-Security-Issues-A-possible-resolution-tp5735108p5735180.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-10 Thread gquintana
You could have one (and only one) JMS message listener for each kind of message and use JMS message selector to let one thread select some kind of messages while leaving other ones. Each listener thread will consume ordered messages of one kind, each listener will separately from others. -- View

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-10 Thread gquintana
Then why don't you do something like: The route from JMS to Seda is monothreaded, but it should be fast enough (the bottleneck is javaspaces, is it?), then each route from Seda to Javaspaces can work in parallel. -- View this message in context: http://camel.465427.n5.nabble.com/Incoming-mess

Re: CSV files processing

2013-07-10 Thread gquintana
I would convert the CSV file into a List>, each row being a Map, the first String being the column header name. Unfortunately Camel CSV unmarshals to List> and Camel Bindy looks too strict for your case (unmarshalls to List). So I would code my own data format to do the conversion CSV --> List> usi

Re: CSV files processing

2013-07-11 Thread gquintana
XPath is the language to walk through the XML Dom Tree. Either you treat the file as a String and use String operations ( Simple as contains and regex operations). Or you treat the file as Java object tree (after unmarshalling) and walk through the Java objec

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-16 Thread gquintana
Seda breaks transaction propagation since different threads are used. But you can replace seda by JMS from("jms:queue:abc") .choice() .when(simple(body.msg.type).isEqualTo("a")) .to("jms:queue:only_a") .when(simple(body.msg.type).isEqu

Re: Shutting down a route, inflight messages and splitter

2013-07-16 Thread gquintana
Read http://camel.apache.org/graceful-shutdown.html, and probably add startupOrder: Route #1 startup order 4 Route #2 Route #3 startup order 2 Route #4 startup order 1 Are your Routes #3 and #4 In-Out or In Only? Is your Splitter using an aggregation strategy? In which one of your routes are in-f

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-17 Thread gquintana
Hi Raúl, In a non XA world, how does this Unit of work concept mix with Spring's management of transaction and resources (connections) which are bound to thread by the TransactionSynchronizationManager? -- View this message in context: http://camel.465427.n5.nabble.com/Incoming-message-from-

SEDA with PriorityBlockingQueue

2013-07-29 Thread gquintana
Hi, Is it possible to configure a SEDA endpoint so as to handle priorities using a PriorityBlockingQueue instead of LinkedBlockingQueue, and optionally provide a Comparator to sort messages? Thanks, Gérald -- View this message in context: http://camel.465427.n5.nabble.com/SEDA-with-PriorityBl

Re: JMS properties to In message headers

2013-07-29 Thread gquintana
I think you should extend the JmsHeaderFilterStrategy -- View this message in context: http://camel.465427.n5.nabble.com/JMS-properties-to-In-message-headers-tp5736433p57364

Re: SEDA with PriorityBlockingQueue

2013-07-30 Thread gquintana
I can open a JIRA for creating the queue factory, and then propose a PR if you wish. Gérald -- View this message in context: http://camel.465427.n5.nabble.com/SEDA-with-PriorityBlockingQueue-tp5736411p5736467.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel JPA - Clustered Deployment - Quartz Scheduling

2013-08-01 Thread gquintana
I find it strange to have N rows in Quartz tables for N cluster nodes. You should have one row per route x action on route. I imagine that if you schedule the same action for the same route on 2 different cluster nodes, sometimes one cluster node will try to execute the Job scheduler by the other n

CXF endpoint with Servlet transport

2013-08-29 Thread gquintana
Hello, I am trying to setup a CXF endpoint from a webapp, but I am getting the exception: How does CXF binds to the Servlet? My web.xml is basically the one described at http://cxf.apache.org/docs/servlet-transport.html My Spring config contains : Using Camel 2.11.1 / WebLogic 10.3.4 / Jav

Re: CXF endpoint with Servlet transport

2013-08-29 Thread gquintana
Well I found the solution (thanks Google ;-) ), I needed the address attribute and I shouldn't prefix this address by http://... -- View this message in context: http://camel.465427.n5.nabble.com/CXF-endpoint-with-Servlet-transport-tp5738217p5738218.html Sent from the Camel - Users mailing li

Re: Problem in converting Cron expression into proper date format.

2013-09-16 Thread gquintana
With Quartz With Spring -- View this message in context: http://camel.465427.n5.nabble.com/Problem-in-converting-Cron-expression-into-proper-date-format-tp5739498p5739527.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel + myBatis Issue

2013-10-02 Thread gquintana
To do batch insert/update with MyBatis, you must use a SqlSession with BATCH ExecutorType: or -- View this message in context: http://camel.465427.n5.nabble.com/Camel-myBatis-Issue-tp5740706p5740750.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue with Transactions and Split

2013-10-04 Thread gquintana
How did you declare the transaction manager? Something like: -- View this message in context: http://camel.465427.n5.nabble.com/Issue-with-Transactions-and-Split-tp5738618p5740888.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue with Transactions and Split

2013-10-05 Thread gquintana
- You can receive only one message per transaction (at least with Spring DMLC), but can send many - The transaction should wrap the whole route as long you don't change thread (paralllelProcessing) - You mat set transacted=true and transactionManager in your ActiveMQ endpoints: from("activemq:que

Re: JPA type converter for multiple entities?

2013-10-16 Thread gquintana
Your error message is telling "Incorrect integer value: '\xAC\xED\x00\x05sr\x00,org.apache.camel.example.etl.PromotionEntity$\x0C\xF5\xF1\x08\x0B\xA2\x81\x02\x00\x05L\x00\x02idt\x00\x10' for column 'ITEM_PROMOTION_ID'". It seems to that you are trying to insert a Java String into a SQL Number colum

Re: a question on servlet component

2013-10-25 Thread gquintana
If you want your browser to display the response as a web page, then you should set Content Type header with text/html value. Gérald -- View this message in context: http://camel.465427.n5.nabble.com/a-question-on-servlet-component-tp5742164p5742168.html Sent from the Camel - Users mailing lis

Re: capacity of seda/vm with multipleConsumers=true?

2013-10-27 Thread gquintana
Hi, Reading from SEDA component documentation , I can see: "blockWhenFull 2.9 falseWhether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By* default, an exception will be t

Re: capacity of seda/vm with multipleConsumers=true?

2013-10-28 Thread gquintana
As it's a LinkedBlockingQueue, the messages are read using BlockingQueue#poll method, then whatever the result of the processing may be, the messages has been picked. I think the multipleConsumers acts like the multicast processor, you could replace SED

Re: capacity of seda/vm with multipleConsumers=true?

2013-10-28 Thread gquintana
The answer I is: before the first reader takes the message. And again it's not related to multiple consumers. Gerald -- View this message in context: http://camel.465427.n5.nabble.com/capacity-of-seda-vm-with-multipleConsumers-true-tp5742266p5742323.html Sent from the Camel - Users mailing list

Re: Camel 2.12.1, Spring Framework 3.2.3, Jboss 6.0.0 Deployment Problem

2013-11-08 Thread gquintana
As far as I remember, there was something like this (in jboss-web.xml) to isolate your WebApp classes: Gérald -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-12-1-Spring-Framework-3-2-3-Jboss-6-0-0-Deployment-Problem-tp5742612p5742825.html Sent from the Camel - User

Re: Transaction among the routes in a routebuilder

2014-01-30 Thread gquintana
As soon as you use a SEDA endpoint, the message is passed to a different thread and the transaction context is lost by the receiving thread. Said differently, transaction is not propagated across different threads. -- View this message in context: http://camel.465427.n5.nabble.com/Transaction-a

Master/Slave failover using database lock

2014-01-31 Thread gquintana
Hello, I'm deploying my Camel routes in a WebLogic cluster. Is there something to force a route to run on a single node. I saw the Zookeeper RoutePolicy but it looks complicated. Is there a routepolicy using a database lock to select the single node? I know that ActiveMQ, Karaf, Quartz can do it.

Re: Master/Slave failover using database lock

2014-03-02 Thread gquintana
Hello, I tried to implement my own route policy, you can have a look at code here: https://github.com/gquintana/camel/compare/locking-routepolicy It's only a prototype at the moment, I didn't test my code in real app, there are some unit tests though. Yet I'm a bit puzzled:

JAXRS client proxy and HTTP Conduits

2014-06-11 Thread gquintana
Hello, How are Conduits and HTTP Client endpoints bound together? This example works: This example doesn't work, conduit is not applied on JAXRS client proxy: Using CXF 2.6.6 / ServiceMix 4.5.1 Gérald -- View this message in context: http://camel.465427.n5.nabble.com/JAXRS-client-proxy-

Re: JAXRS client proxy and HTTP Conduits

2014-06-11 Thread gquintana
Ooops. I thought I was posting on CXF forum. I move this question, see you there http://cxf.547215.n5.nabble.com/JAXRS-client-proxy-and-HTTP-Conduits-td5745021.html -- View this message in context: http://camel.465427.n5.nabble.com/JAXRS-client-proxy-and-HTTP-Conduits-tp5752164p5752171.html Sen

Rest DSL with Jetty

2014-10-08 Thread gquintana
Hello, I am playing with the new REST DSL: 1) The context path is not taken into account: 2) I can't bind both "post" and "get" verbs on the same path: What did I miss? Gérald -- View this message in context: http://camel.465427.n5.nabble.com/Rest-DSL-with-Jetty-tp5757418.html Sent from

Multicast with multiple timeouts

2014-11-25 Thread gquintana
Hello, I am sending a message to multicast parallel processor with a 2s timeout: I thought the timeout would protect against any slow consumer. But I noticed that as soon a single consumer exceeds timeout, some of the following consumer results are not agregated: I expected to have "HELL

Re: Multicast with multiple timeouts

2014-11-25 Thread gquintana
Clean and simple test case: -- View this message in context: http://camel.465427.n5.nabble.com/Multicast-with-multiple-timeouts-tp5759576p5759596.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Multicast with multiple timeouts

2014-11-26 Thread gquintana
Is there an issue I can follow or should I create one? Gérald -- View this message in context: http://camel.465427.n5.nabble.com/Multicast-with-multiple-timeouts-tp5759576p5759646.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel cxfrs with swagger.

2014-12-11 Thread gquintana
Hello, As strange as it may seem, the SwaggerFeature plays well with pure CXFRS, but doesn't with Camel CXFRS: In the first case (): the ApiListingResourceJSON does it's job and return the swagger JSON. In the second case (), the ApiListingResourceJSON is not called, the request is not intercep

Re: camel cxfrs with swagger.

2014-12-11 Thread gquintana
I don't fully understand your proposal. After digging bit, I came to the conclusion that it wasn't the server declaration which was different, but the fact that the consumer was installing the CxfRsInvoker in the server which changed everything. The CxfRsInvoker swallows all requests to produce Ca