FT2: How do I know the list of file that a Consumer FTP2 is receiving?

2011-12-20 Thread Raul
ble? Thank you. Below the loop. ConsumerTemplate consumer = context.createConsumerTemplate(); uri=ftp://localhost/ficheros?username=raul&password=&throwExceptionOnConnectFailed=true&disconnect=true while (follow) { try { // max waiting 15 secon

Re: FT2: How do I know the list of file that a Consumer FTP2 is receiving?

2011-12-20 Thread Raul
Thank you, Babak, But, I want to stop the consumer, or the route, without interrupt a reception. In my case, the route would run every 2 minutes (aprox.), but it is possible that in some cases there are high-volume files that take longer than 2 minutes. I don't want to long checking more than 2 m

(FTP) DefaultScheduledPollConsumer: Converts a polling consumer into an event-driven consumer instance.

2012-01-10 Thread Raul
Hello, I want to create a custom component (Component, EndPoint, Consumer, Producer..). This component will create a FTP Route and it will have the control to start and stop the FTP Route and the business logic too. The first vesion of my component is a poll Consumer. This solution doesn't like m

Re: tcp socket client consumer endpoint?

2012-01-13 Thread Raul
Hello, I'm in the same situation. I need a client consumer. Has this requeriment (client consumer) solution today? I read the documentation, and I undertand that when I make a route like that: from("mina:tcp://localhost:port").process(miProcesador).to("seda:distribucion") I am making a TCP

Re: (FTP) DefaultScheduledPollConsumer: Converts a polling consumer into an event-driven consumer instance.

2012-01-16 Thread Raul
I suppose that the event will be produced when the FTP Route receives every file. When I read that I can convert a polling consumer into a event-driven consumer with DefaultScheduledPollConsumer I thought it's that I need. But I didn't found any example. I am begining to walk with Camel. I though

Re: Camel sftp endpoint and exception handling.

2012-01-19 Thread Raul
I have a similar problem. (.GenericFileOnCompletion) [ad #0 - ftp://localhost/origen] GenericFileOnCompletionERROR Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: Software caused connection abort: socket write error. Code: 250] In

Re: Camel sftp endpoint and exception handling.

2012-01-26 Thread Raul
Hello again, I have relized that I must use a ProcessStrategy instead of PollStrategy. ProcessStrategy can be used in the uri like pollStrategy uri = "ftp://..&processStrategy=#myProcessStrategy";; This parameter is of Camel-File2 and FTP2 inherits it. I am using the GenericFileRenameProces

ExceptionHandler in a ftp Route

2012-02-02 Thread Raul
I am lost again, How can I associated an ExceptionHandler to the consumer of a FTP Route? I am seeing the code of the method* processStrategyCommit *of the class *GenericFileOnCompletion* and I watch that if there is a problem in the execution of *commit()*, it is catching the exception and It's

Re: ExceptionHandler in a ftp Route

2012-02-03 Thread Raul
Hello Babak, I have read your thread [2] and the problem of "renaming/moving/deleting" is of mine. I believe that it's posible control a ftp route with 3 elements: I will use an example //Exception control onException(Exception.class).bean(myErrorControl).handled(true).to("mock:error"); // FTP

Re: ExceptionHandler in a ftp Route

2012-02-06 Thread Raul
Hi Babak, Could you say me how inject my own custom ExceptionHandler to the Consumer of my FTP Route? I am using Spring to define my Route http://camel.apache.org/schema/spring";> FtpRoute is a class that extends RouteBuilder. I would be very grateful. -- View this message in co

Re: ExceptionHandler in a ftp Route

2012-02-07 Thread Raul
Hello again Babak, I have got to associate own custom ExceptionHandler to the Consumer of my FTP Route. But I continue to have problems to control "renaming/moving/deleting" of FTP. I have followed the code and the problem is that the ExceptionHandler of the Consumer is diferente of GenericFileOn

Re: ExceptionHandler in a ftp Route

2012-02-08 Thread Raul
Hi again babak, I have made my own Synchronization and I have added it at the begin of my Process. During the debug I could observe there were both Synchronizations: - MySynchronization - The Synchronization of GenericFileOnCompletion I am using in my ftp route the option "move=.done", but to

Re: Camel: when() with boolean parameter

2013-09-30 Thread Raul Kripalani
Is the variable initialized at route construction time? If yes, you should wrap the isEquals in a constant expression: constant(isValid.equals(...)). The simple language wouldn't work because the variable doesn't exist during the runtime of the route. If you want to set the isValid depending on

Re: The Camel Components Poster - PDF - FREE

2013-10-03 Thread Raul Kripalani
Robert, Many thanks for this fantastic contribution to the Camel community! I did vote for another design but I liked this one too ;-) Given that the Camel component catalogue is ever expanding, it would be a good idea to include the Camel version line that the poster applies to. I guess it's too

Re: The Camel Components Poster - PDF - FREE

2013-10-05 Thread Raul Kripalani
The velocity component was missing in the "Templates" section on the Grouped Component List wiki page. I added it yesterday, but I suspect it was consequently missing too from the poster. I can't confirm it now because the latter is no longer accessible, which is a good thing until the trademark is

Re: I am stuck with Dynamic router/multicast design

2013-10-09 Thread Raul Kripalani
Hello, Have you tried starting your route with a 15 min timer, and then using the pollEnrich DSL to fetch the remote files? http://camel.apache.org/content-enricher.html#ContentEnricher-Contentenrichmentusingthe%7B%7Benrich%7D%7DDSLelement from("timer:foo?fixedRate=true&period=90") .multi

Re: Apache Camel multithread processing

2013-10-12 Thread Raul Kripalani
If you're trying to process multiple records picked up by a DB query in parallel, you should take a look at the Splitter EIP, which includes support for multithreading out of the box. Regards, Raúl. > On 12 Oct 2013, at 01:21, astorath wrote: > > I want the route to operate in several thread sim

Re: Timeouts in CXFRS

2013-10-15 Thread Raul Kripalani
It looks like you're using the CXF endpoint URI configuration style. Have you tried switching to the bean configuration style? I use the latter type of configuration frequently, an it always works. Regards, Raúl. On 12 Oct 2013 15:32, "Nils Andermo" wrote: > I have read the thread you suggest ca

Re: Performance degradation on consumer side when switching Camel from 2.11.0 to 2.12.1v

2013-10-28 Thread Raul Kripalani
Hello, The code base of the camel-jms component hasn't varied considerably [1] and I don't outright see any cause why this component would be the culprit of the slowdown. I did spot a change in the JmsHeaderFilterStrategy to introduce the includeAllJMSXProperties option. But this defaults to fals

Re: JAX-RS and Camel - Except 1st QueryParameter all others are null

2013-11-01 Thread Raul Kripalani
d list values, and > will take care of parameters having multiple values (&a=1&a=2, etc). > > I'm still not sure how it can be resolved with Simple Binding Style, but I > think I can manage to do a patch, unless Raul (Simple Binding Style guru) > can beat me to it :-

Re: JAX-RS and Camel - Except 1st QueryParameter all others are null

2013-11-01 Thread Raul Kripalani
Ok, I see what's happening here. The SimpleConsumer binding style is truly injecting the parameters into Camel IN message headers with names: q, start, size. If you add a "log all" endpoint just after the CXFRS consumer, you will see the parameters sitting there as message headers: .to("log:TEST?s

Re: Passing parameters to a direct / seda / vm endpoint

2013-11-03 Thread Raul Kripalani
Hello, Thanks for your participation in users@camel! Even if we provided a way to set dynamic parameters as part of the URI – and have Camel channel those downstream from the producer to the consumer – how would the endpoints/processors sitting behind the SEDA / VM / Direct consumers acquire acce

Re: SJMS failure with stale reply queue

2013-11-08 Thread Raul Kripalani
If these are request-reply interactions, producers should set a Time To Live when sending a message to the queue. The broker will then expire stale messages automatically and they won't be delivered to the consumer, thus reducing the risk of the consumer sending out unexpected replies like this one

Re: SJMS failure with stale reply queue

2013-11-08 Thread Raul Kripalani
help in some cases, but I don't see how it solves the problem, > when the producer dies before the message TTL is over. > > Regards, > Harald > > > 2013/11/8 Raul Kripalani > > > If these are request-reply interactions, producers should set a Time To > >

Re: Adding end point details to Camel logs

2013-11-08 Thread Raul Kripalani
Camel won't do this, but you can set up your logging stack to achieve this, e.g. log4j or logback. You should be able to create custom PatternLayouts in log4j or new LoggerConverters in logback. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Int

Re: SJMS failure with stale reply queue

2013-11-09 Thread Raul Kripalani
s working after one attempt to send to a missing queue. > >> > >> I've tried to debug the situation, and it seems that SJMS creates > sessions > >> in advance from connections obtained from JBoss, but JBoss closes each > >> connection when an exception o

Re: MongoDB exchange Out Body is null, using Apache Camel

2013-11-09 Thread Raul Kripalani
If you're using Camel >= 2.10.3 or 2.11, enable the writeResultAsHeader endpoint option. In the future, please use the users@ forum for such queries. And please remember to always indicate what version of Camel you're running on. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | En

Re: xmljson convert XML from file to JSON straight into MongoDB issue

2013-11-14 Thread Raul Kripalani
Do you see any exceptions? Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Nov 14, 2013 at 2:51 PM,

Re: xpath filter question

2013-11-16 Thread Raul Kripalani
In the future, you can use the .logNamespaces() option of the XPath expression to ask Camel to dump to your log files the namespaces that are discovered in your incoming XML payload. BTW - the work your processor is doing is simply to convert the payload to a String. You can achieve this by using

Re: a camel based solution that can read message headers without de-queuing a message from the MQ

2013-11-20 Thread Raul Kripalani
You can use JMS Message Selectors with Queue Browsers. So if you're looking for messages with a particular value in a particular header, you can create a Message Selector for that. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specia

Re: DSL Logging not outputting to the logs

2013-12-02 Thread Raul Kripalani
Are you getting any other log statements printed out to your 'out' console appender? Given that you've set the root log level to DEBUG in your log4j configuration, you should be seeing a lot of log noise from Camel. If you don't, your container may not be picking up your log4j configuration file.

Re: Distributed AggregationRepository

2014-01-08 Thread Raul Kripalani
Careful, HawtDB is deprecated, as advertised in the camel-hawtdb component page. Unfortunately, the warning doesn't render in a shaded box any longer (due to some recent Confluence migration), so it's easy to miss it. Sorry about that. LevelDB is recommended instead, but the technology has two lim

Re: Distributed AggregationRepository

2014-01-09 Thread Raul Kripalani
Hi Claus, On Thu, Jan 9, 2014 at 8:42 AM, Claus Ibsen wrote: > Hmm I am not aware of such. > > camel-levedb is using same principle as the leveldb store in AMQ > http://activemq.apache.org/leveldb-store.html > > And allows concurrent and distributed reads/writes to the shared > store. eg use a s

Re: Camel MongoDB Bug related to Type Conversion

2014-01-16 Thread Raul Kripalani
Hello, Yes, as far as I remember the Type Converter Registry memorises what converters were successful in converting from a given source to a destination type, with the goal of speeding up the resolution of future type conversion attempts. Probably this converter is getting blacklisted due to the

Re: Java Route Not Finishing

2014-02-13 Thread Raul Kripalani
If the incoming message via the MQTT consumer was InOut (i.e. request-reply), it's likely that the JMS producer is sending the message as InOut. This means that the producer is waiting for a reply. Try setting the 'exchangePattern' option on the JMS endpoint to 'InOnly' to instruct the producer tha

Re: Unable to resolve endpoint for cxf rest service

2014-02-19 Thread Raul Kripalani
Hello, You have camel-core and camel-spring version 2.10 mixed up with camel-cxf version 2.12. The class definitions are different, that's why they can't find each other. Try upgrading camel-core and camel-spring to 2.12. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterpris

Re: Camel CXF RS

2014-03-05 Thread Raul Kripalani
Unfortunately that tutorial only showcases Camel as a client, but not as a service provider. If you want to build a JAX-RS service, I suggest you use the new SimpleBinding to make sure that your @HeaderParams, @PathParams, @QueryParams, etc. are injected as Camel headers, and that your request pay

Re: Accessing an osgi service interface from another bundle

2014-03-13 Thread Raul Kripalani
If Spring DM is able to resolve the OSGi reference correctly, 'mappingservice' becomes a local bean in the Spring Context of the second bundle. This means that you can inject it around like any other bean. For example: ... provided that com.ab.mypgm has a setter for property

Re: Updating state in a route.

2014-03-19 Thread Raul Kripalani
Sounds reasonable to me. To prepare the system for HA, you can broadcast the state on a JMS topic to which all nodes subscribe to. Contrary to making the route itself check every two minutes, this method allows you to run the checking logic in a single place inside the cluster, in an HA scenario. T

Re: Issues with cxfrs using json

2014-03-28 Thread Raul Kripalani
Hello, Could you add a Log endpoint with the showAll=true option? We need to see what the incoming request looks like. Particularly the Content-Type header. Also please paste your JAX-RS resource class. Are you setting the @Consumes annotation? Another point: getBody(Class) also returns null whe

Re: Issues with cxfrs using json

2014-03-31 Thread Raul Kripalani
Exactly. Currently you are telling Camel that you want a String. That's why you're not getting a POJO. *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blo

Re: Issues with cxfrs using json

2014-03-31 Thread Raul Kripalani
It depends on what you're exposing the endpoint for. If the REST endpoint is a gateway to a business process / service orchestration / aggregation / scatter-gather / etc. (replace with any kind of EIP or combination of EIPs), speaking to 10+ systems over different protocols (SOAP, plain HTTP, JMS,

Re: Looking for ideas to reduce code volume and duplication

2014-04-02 Thread Raul Kripalani
Try this technique. Nothing fancy, just a plain old Java static helper method. It relies on Camel being able to configure exception handlers if placed at the end of the route definition, which I think is possible. Please give it a spin and report back to the community! public class RouteExceptionH

Re: DataFormat Versus TypeConverters

2014-04-02 Thread Raul Kripalani
Sorry for the delay, I missed the original post from February. This seems to me like a question on customising the Jackson bindings. Have you tried using the @JsonValue annotation? Have a look at [1]. [1] http://stackoverflow.com/questions/13386930/why-doesnt-jsonunwrapped-work-for-lists HTH,

Re: Camel Succesful delivery acknowledgements..

2014-04-04 Thread Raul Kripalani
Hello XA transactions are your friend in this scenario. Beware that the whole goal of leveraging a Message Broker is to decouple the producer from the consumer. In fact, when the producer sends the message, there may be a consumer there may be not, but if you've set the JMS delivery mode appropri

Re: JDBC component and jboss ds.xml file

2014-04-12 Thread Raul Kripalani
This will help you: http://stackoverflow.com/questions/9183321/how-to-use-jndi-datasource-provided-by-tomcat-in-spring. Raúl. > On 12 Apr 2014, at 06:43, moj0002 wrote: > > I have my data source defined in a jboss ds file (myDB2Database-ds.xml) that > goes either in the jboss deploy directory or

Re: Does Camel MongoDB use cursors on findAll ?

2014-04-17 Thread Raul Kripalani
Hi, We use Mongo cursors to read from the DB. But a DBCursor is not something we can return to the route because not all technologies support Streams, Cursors, Chunking, etc. For example, how would you go about returning a DBCursor to a JMS endpoint? That's why we offer the skipping and limiting

Re: Does Camel MongoDB use cursors on findAll ?

2014-04-18 Thread Raul Kripalani
a. > - loop over the data set reading batch parts using "skip" and "page size" > - write the paged results appending them to the file. > - etc ? > > Have you an example of paging process ? > > Thanks for you help. > > Ephemeris Lappis > > Le

Re: Basic direct-vm scenario produces error

2014-04-21 Thread Raul Kripalani
Check the endpoint URIs on the producer and consumer side. There seems to be a mismatch - perhaps it's a copy paste error? On 22 Apr 2014 00:50, "John Dubchak" wrote: > Hi, > > I am trying to route a JMS message using an xpath expression. The > expression and message conversion seem to work fine

Article Java Magazin July 2014 on Apache Integration stack

2014-06-03 Thread Raul Kripalani
Communities, Quick announcement to let you know that we have published an article on Apache Camel, Apache ServiceMix powering a best-practice, geographically-federated SOA solution in the July 2014 issue of the Java Magazin (edited by JAXenter.de). The Apache ServiceMix brand has been featured on

Re: Article Java Magazin July 2014 on Apache Integration stack

2014-06-04 Thread Raul Kripalani
aulkr.net | twitter: @raulvk On Tue, Jun 3, 2014 at 10:20 AM, Raul Kripalani wrote: > Communities, > > Quick announcement to let you know that we have published an article on > Apache Camel, Apache ServiceMix powering a best-practice, > geographically-federated SOA solution in the Jul

Re: Article Java Magazin July 2014 on Apache Integration stack

2014-06-06 Thread Raul Kripalani
**** > > > -Original Message- > From: Raul Kripalani [mailto:r...@evosent.com] > Sent: Wednesday, 4 June 2014 9:07 PM > To: us...@activemq.apache.org; users@camel.apache.org; > us...@servicemix.apache.org > Subject:

Re: AHC module not passing the request body

2014-08-20 Thread Raul Kripalani
You can enable logging in the AHC library by setting the appropriate log categories to DEBUG or TRACE level in your log stack configuration. This will show what AHC is actually sending to the backend. If you are using AHC 1.8.x, the logging category to enable is com.ning.http. It could happen th

Re: AHC module not passing the request body

2014-08-20 Thread Raul Kripalani
put. Thanks, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Wed, Aug 20, 2014 at 12:27 PM, Jaume Sancho w

Re: mongoDB uri

2014-08-25 Thread Raul Kripalani
Hello Andrei, This is an interesting use case. Currently there is no easy way to support your scenario because the MongoDB component requires a com.mongodb.Mongo bean in the registry, e.g. mongodb:connectionBean?... In your context: ... However, many ideas come to mind. Y

Re: apache repository down?

2014-08-25 Thread Raul Kripalani
I was able to access the URLs you posted successfully, with a POM file coming back. Perhaps check your proxy settings and try a direct curl/wget... Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalan

Re: mongoDB uri

2014-08-26 Thread Raul Kripalani
Can you post the code showing...? a) how you add the bean. b) how you construct the endpoint URI from within the "MongoConnection" class' dynamic router method. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.m

Re: mongoDB uri

2014-08-26 Thread Raul Kripalani
Did you just need to change the MongoDB Database and the MongoDB Collections? I thought you also wanted to change the hostname and the port at runtime of the Mongo server... If that's not the case, you can even simplify your solution a lot! After all, it seems that your dynamic router is always r

Re: camel-cxfrs and AsyncResponse

2014-08-26 Thread Raul Kripalani
I came across this issue recently and the culprit was the default etc/jetty.xml configuration packaged with Apache ServiceMix, which by default uses the BlockingChannelConnector, as explained in the inline XML comment. This connector does not support Jetty Continuations, therefore it is not capabl

Re: camel-cxfrs and AsyncResponse

2014-08-26 Thread Raul Kripalani
3ContinuationProvider$Servlet3Continuation. > So at least some Continuation is being used. > > > -Original Message- > From: Raul Kripalani [mailto:r...@evosent.com] > Sent: 26 серпня 2014 р. 17:51 > To: users@camel.apache.org > Subject: Re: camel-cxfrs and AsyncResp

Re: Confusing cxf log messages after upgrading to 2.14.0

2014-09-25 Thread Raul Kripalani
Yep, perhaps try setting it as a in your bean... *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Sep 25, 2014

Re: XPATH woes

2014-11-13 Thread Raul Kripalani
Your Envelope element is declared in a default namespace. Your XPath expression must use the namespace when referring to the element. Cheers. On 13 Nov 2014 22:32, "Gershaw, Geoffrey A." < geoffrey.gers...@credit-suisse.com> wrote: > Hi All, > > I'm trying to filter via xpath using the spring con

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2015-01-28 Thread Raul Kripalani
Hey guys, It's me who developed this component, but in Camel we can only go as far as the Jsonlib library goes. Jsonlib prefixes XML attributes with '@' when converting them into JSON properties [1]. I think this is correct: without some kind of differentiation, you wouldn't be able to cycle back

Re: Modifying a shipped TypeConverter

2015-01-28 Thread Raul Kripalani
Yes, we definitely need an option to pick up a custom ObjectMapper. Could you file a JIRA and assign it to me, please? However, the type converter is only used as a (very convenient) fallback. If you provide a DBObject to your endpoint, no type conversions will be triggered. Therefore, for now, y

Re: Trigger FTP Routes in sync

2015-02-24 Thread Raul Kripalani
Take a look at the Controlbus component to start/stop routes programmatically. Normally with FTP consumers, you know when to start them (when the timer fires) but the tricky part is to know when to stop them. You'd probably want to stop them after a period of inactivity, e.g. after 60 seconds. The

Re: MongoDB Consumer Endpoint: ReadPreference cannot be set?

2015-03-11 Thread Raul Kripalani
Hi Joerg, Thanks for your feedback! Indeed this can probably be improved. Could you please open a ticket in our Jira? How would you feel about submitting a pull request? Thanks! Sent from my iPad > On 11 Mar 2015, at 16:13, jpeschke wrote: > > Hello, > When trying to use the "readPreference"

Re: MongoDB Consumer Endpoint: ReadPreference cannot be set?

2015-03-13 Thread Raul Kripalani
I added a unit test and merged your PR. Thanks for your contribution to Camel, and looking forward to many more! Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raul

[DISCUSS] Looks like someone feels threatened... (TIBCO vs Open Source ESBs)

2015-04-17 Thread Raul Kripalani
Just found this marketing landing page published on social networks. It's made by TIBCO and attempts to highlight the downsides of Open Source ESBs. You don't need to be a rocket scientist to gather what exact ESB they are targeting (not us): just look at the images. http://www.tibco.com/integrati

Re: Seconds since 1970

2015-04-17 Thread Raul Kripalani
System.currentTimeMillis() / 1000. You will want to round up or round down (use Math). And please post only Camel-specific questions. For general Java questions, Stack Overflow or Google are your best bets. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Op

Re: [DISCUSS] Looks like someone feels threatened... (TIBCO vs Open Source ESBs)

2015-04-23 Thread Raul Kripalani
ttp://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Apr 23, 2015 at 6:25 AM, Claus Ibsen wrote: > Hi Raul > > Did you get a chance to continue working on this? > > I think for #3 its due to the openes of the source code that people > dive in and help f

Re: Post Request forwarded from Camel does not contain HTTP Body

2013-03-16 Thread Raul Kripalani
Have you set the Content-Type headers properly? Is the client sending "application/json"? Can you add a few log endpoints with showAll=true throughout the route, so we can see what's going on inside? Thanks. On 15 Mar 2013 14:21, "ramrubio" wrote: > Using camel version 2.10.4. > > slip is retur

Re: Enable wire logs on Camel HTTP Proxy

2013-03-20 Thread Raul Kripalani
Can you show us exactly where you are inserting your log statements? A log statement between the servlet endpoint and the http4 one should display what you're after. Sent while on the move On 7 Mar 2013 18:36, "rouble" wrote: > Willem, Scott, Claus et al, > > Appreciate all your input. So, is t

Re: Upload file - How to pass InputStream to Camel's route

2013-03-25 Thread Raul Kripalani
Hi Roman, Yes, this is doable and is in fact quite simple. Just add an argument of type DataHandler or InputStream to the method signature, and annotate it with @Multipart, e.g. @GET @Path("/{myServerHost}/upload") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.MULTIPART_FORM_DATA) pu

Re: Upload file - How to pass InputStream to Camel's route

2013-03-26 Thread Raul Kripalani
Hi Romain! > > With @GET you cannot send content with your request. This is possible with > @POST. > > Best, > Christian > > On Tue, Mar 26, 2013 at 9:14 AM, jamalissimo >wrote: > > > Hi Raul, > > > > thanks for quick answer. This looks easy when you are

Re: Clearing ThreadLocal when exchange completes

2013-03-26 Thread Raul Kripalani
Hi David, The cleanest and most modular way to achieve this is by using EventNotifiers [1], as they execute synchronously. Enable only the ExchangeCompletedEvent and add the bean to your registry. The CamelContext will pick it up automatically. Beware of the Asynchronous Routing Engine, as it can

Re: Question about the implementation of routepolicy.quartz.ScheduledRoutePolicy

2013-03-26 Thread Raul Kripalani
You don't want to stop all endpoints in the route because there may be inflight Exchanges. Instead, you want to stop the inflow of new messages whilst you keep processing any inflight exchanges. That said, it's safe to stop the entire route (including endpoints) once all inflight exchanges are com

Re: Clearing ThreadLocal when exchange completes

2013-03-28 Thread Raul Kripalani
With this technique, developers have to remember to add the custom processor at the start of each route. (Unless it's set from an interceptor...). Since the user explicitly asked for a non intrusive technique, EventNotifier is the only method that fulfills that requirement. Set once per Camel con

Re: Clearing ThreadLocal when exchange completes

2013-03-28 Thread Raul Kripalani
; On Thu, Mar 28, 2013 at 9:36 AM, Raul Kripalani wrote: > > With this technique, developers have to remember to add the custom > > processor at the start of each route. (Unless it's set from an > > interceptor...). > > > > Since the user explicitly asked for a no

Re: Is there a DataFormat to convert XML string to XML Document?

2013-03-29 Thread Raul Kripalani
.convertBodyTo(Document.class) Leverages a feature of Camel called Type Conversion. Raúl. Sent while on the move On 29 Mar 2013 22:40, "Chris Wolf" wrote: > I don't see any listed here: > > http://camel.apache.org/data-format.html > > ...but I find it hard to believe there isn't a way to conve

Re: Splitter, Aggregation and Timeouts

2013-03-29 Thread Raul Kripalani
Yes. The multicast can send to a direct endpoint, which does the transformation and then dispatches to the final destination. Another technique is to use the onPrepare option of the multicast DSL. But this applies better when the same transformation logic is to be applied to each and every target

Camel CXF RS: New Simple binding style for JAX-RS

2013-03-31 Thread Raul Kripalani
Hi users, As you may know, Camel has supported JAX-RS under the camel-cxfrs component for a long time now. However, the support has been rather low-level, requiring the user to manually process the MessageContentsList object coming into the route. Thus tightly coupling the route logic with the me

Re: Need help with cxfrs component, actually RESTful service consumption, in general

2013-03-31 Thread Raul Kripalani
Hi guys, Take a look at the new Simple binding style for CXFRS consumers, which greatly simplifies consuming REST requests: https://cwiki.apache.org/confluence/display/CAMEL/CXFRS#CXFRS-ConsumingaRESTRequestSimpleBindingStyle . Fresh out of the oven. Regards, *Raúl Kripalani* Enterprise Archite

Re: Camel CXF RS: New Simple binding style for JAX-RS

2013-04-01 Thread Raul Kripalani
x in Camel. > http://camel.apache.org/examples > > > > On Sun, Mar 31, 2013 at 10:10 PM, Raul Kripalani wrote: > > > Hi users, > > > > As you may know, Camel has supported JAX-RS under the camel-cxfrs > component > > for a long time now. > > > > However

Re: Splitter, Aggregation and Timeouts

2013-04-04 Thread Raul Kripalani
Then you're really after a split pattern rather than a multicast. Create a bean that does the lookup and returns a List of ids. Then plug it into the split EIP with: .split(method(MyBean.class)). The splitter will process each List element individually. Regards, Raúl. Thanks, Is there a way t

Re: Splitter, Aggregation and Timeouts

2013-04-04 Thread Raul Kripalani
Take a look at the "Using a Pojo to do the splitting" section in the Split EIP docs. I can't give you a deep link now, sorry. Regards, Raúl. On 5 Apr 2013 01:14, "Raul Kripalani" wrote: > Then you're really after a split pattern rather than a multicast. >

Re: Strange Error with XSLT transformation

2013-04-12 Thread Raul Kripalani
On Fri, Apr 12, 2013 at 12:17 PM, Jothi wrote: > version="1.0" encoding="UTF-8" standalone="yes"?> > > 176722 > 12345 > Y > > Your XML is badly formed. Notice the opening and closing tags of the sourceId element. *Raúl Kripalani* Enterprise Architect, Open Source Integration spec

Re: Log in file

2013-04-12 Thread Raul Kripalani
Hi Jean Francois, What you need is exactly the SiftAppender, which will log to a different file depending on some dynamic parameter in the Mapped Diagnostic Context (MDC). Use this appender from log4j: org.apache.log4j.sift.MDCSiftingAppender. In the Camel route, write a custom processor that se

Re: Is there a way to programmatically get the the downstream endpoint from a custom Processor?

2013-04-12 Thread Raul Kripalani
One solution is to parametrize the downstream endpoint in the Registry. from("...").process(new MyProcessor()).to(myDownstreamEndpoint); where myDownstreamEndpoint is a bean property of type String that gets injected via Spring or Blueprint during the route initialization. It should always have

Re: Strange Error with XSLT transformation

2013-04-15 Thread Raul Kripalani
Try enabling stream caching [1]. It's possible that the underlying stream is slurped by the tracer before it even gets to the XSLT. [1] http://camel.apache.org/stream-caching.html *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer h

Re: How to set mock for inner route?

2013-04-18 Thread Raul Kripalani
Could you post the stacktrace, please? *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Apr 18, 2013 at 4:3

Re: CXF Bean, MultiPart -> Couldn't find MIME boundary

2013-04-18 Thread Raul Kripalani
Why don't you use the CXFRS endpoint directly, instead of bridging over through Jetty? Something's probably going haywire with the combination of Jetty, CXF bean and Multiparts... Note there's a new SimpleCxfRsBinding in 2.11 [1], which you can use in older versions by copying the class into your

Re: CXF Bean, MultiPart -> Couldn't find MIME boundary

2013-04-18 Thread Raul Kripalani
.11 jar, > what would my camel route look like to make use of it including the port? > Would I still be using jetty or configuring a cxfRsBinding in XML/cfg? > > > > Thanks again! > > -Original Message- > From: Raul Kripalani [mailto:r...@evosent.com] > Sent: T

Re: How to unmarshal a XML String to java object for properties without required annotation

2013-04-18 Thread Raul Kripalani
You have a mismatch between the XML element named 'fieldValue' and the POJO property named 'fieldVal'. *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http:/

Re: cxf producer needs a break?

2013-04-22 Thread Raul Kripalani
Are you sure the problem is on Camel's end? I've never seen such a behaviour. How long does the external service take to respond? Perhaps it cannot handle concurrent requests? Or it responds badly? What's the exception seen by Camel? To aid investigation, I suggest you monitor de HTTP traffic us

Re: Is possible to wrap a part of route?

2013-05-02 Thread Raul Kripalani
Place the common part in it's own route and make it consume from a Direct endpoint, e.g. direct:common. Raúl. On 2 May 2013, at 14:27, horyna wrote: > We have in lots routes some common part. e.g.: > > .setHeader("h", constant(THIS_IS_VARIOUS_FOR_EVERY_ROUTE)) >.filter(method("

Re: Is possible to wrap a part of route?

2013-05-03 Thread Raul Kripalani
Yes, if the route definition varies for each route, you are better off creating a Helper class with static methods that build up whatever route nodes you need. Another way is to create a base abstract RouteBuilder class that takes care of the common route definitions. The per-route arguments are p

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: What is the best approach to do an "asynchronous rendezvous"?

2013-05-15 Thread Raul Kripalani
ke > expressions help in this regard, but not all of them work with > expression-language > configuration, e.g. SFTP Consumer. > > Thanks, > > Chris > > On Wed, May 15, 2013 at 3:46 PM, Raul Kripalani wrote: > > Hi Chris, > > > > I like this kind of probl

Re: Asynchronous routing with jms hangs in midstream

2013-05-19 Thread Raul Kripalani
Given there's no stack trace and that there's an apparent freeze. Could you take a thread dump of the JVM for us to analyse? Are you sure the DB is not dead locking? Can you add a log endpoint statement to your exception handler, with showAll and showStackTraces=true? Also enable the stopOnExcep

Re: Sharing a solution for discussion

2013-05-19 Thread Raul Kripalani
If you use camel-cxfrs, you can just define the @FormParams and @QueryParams in the method signature of your REST resource class. Then use the SimpleCxfRsBinding (see camel-cxfrs component doc), which parses the request, extracts all declared parameters and injects them as Camel headers. This wa

  1   2   3   4   >