Re: Workaround interceptFrom().transacted()

2013-10-01 Thread Claus Ibsen
Use advice-with if you wanna "mess around" with routes. On Fri, Sep 27, 2013 at 5:05 PM, Charles Moulliard wrote: > Hi, > > Since Camel 2.12, the following syntax is not longer tolerated/accepted. Is > there a workaround > > public void testInvalidTransactedInterceptFrom() throws Except

Re: Workaround interceptFrom().transacted()

2013-10-01 Thread Charles Moulliard
AdviceWith can only be used for unit test. The problem that the customer would like to solve is the following : Customer has developed some classes that the project will use to develop Camel routes. These classes are abstract RouteBuilder class where strategies have been developed to handle functio

Re: Camel route - how to move the file in the failed directory if there's an error

2013-10-01 Thread Claus Ibsen
camel-spring-batch would have to fail with an exception for the file consumer to move the file to the failed directory. Not sure how spring batch triggers this. I suggest to dive into the source code / unit tests to take a look. On Tue, Oct 1, 2013 at 12:31 AM, nguyen wrote: > Oups the route did

Re: CAMEL + CXF+ ACTIVE MQ

2013-10-01 Thread pannereselvam
Thanks Willem. -- View this message in context: http://camel.465427.n5.nabble.com/CAMEL-CXF-ACTIVE-MQ-tp5740278p5740648.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Read a stream from telnet service

2013-10-01 Thread David Wicki
Thank you for your answer. I think I'm going to implement the logic myself and feed a JMS queue. From there on, I can use Camel... -David On 09/30/2013 12:54 PM, Claus Ibsen wrote: This is not currently possible out of the box in any of the camel-mina or camel-netty components. You can of

Re: Camel's use of jsch/java.io

2013-10-01 Thread Claus Ibsen
Hi The code is in jsch? If so you should report this to the jsch team. On Tue, Oct 1, 2013 at 6:46 AM, neil wrote: > Hi, > I would like to report a potential bug in Camel's use of jsch/java.io, and > find a potential workaround. > > Apologies in advance for abusing terms -- I am only a Camel use

Re: @XmlElement overriding @JsonProperty

2013-10-01 Thread Claus Ibsen
Hi Did you look into this? Maybe there is a flag/option you can set in jackson to have it favor @JsonProperty over JAXB. If so maybe there is something we can add to camel-jackson, so you can turn this flag on/off. On Wed, Jul 17, 2013 at 11:57 PM, Craig Tataryn wrote: > I'm working on a little

FTP siteCommand Option

2013-10-01 Thread anakin59490
Hi, i want to upload file to a server but when i run the program, i got this message : "Writing file failed with: File operation failed: 501 File must be specified by library/file.member. Cannot change directory to: /. Code: 501" Because when i login to the server, i login to AS400 I thi

Bean component/Bean Binding: Body as InputStream parametr (specified as ${body} in route)

2013-10-01 Thread radek_kraus
Hello, I am playing with "bean binding" on bean component. I know, that I can solve my requirements by another way. But anyway I think, that my "syntetic" example doesn't work how I expect (I tested it with Camel 2.11.2, 2.12.1). I have a "streamBodyBindingBean" bean with this method: public v

Re: Bean component/Bean Binding: Body as InputStream parametr (specified as ${body} in route)

2013-10-01 Thread Taariq Levack
Hi Looks like you're trying to read the stream twice, try again after enabling stream-caching[1] [1] http://camel.apache.org/stream-caching.html Taariq On Tue, Oct 1, 2013 at 11:25 AM, wrote: > Hello, > I am playing with "bean binding" on bean component. I know, that I can > solve my require

Apache Camel - Multicast - Is there a 'null' or a similar endpoint ?

2013-10-01 Thread arunodhaya80
Please excuse stupidity as this is my first Camel application 1. To respond to a web request, I am sourcing the content from two different sources. 2. I am, therefore, making a multicast request to two methods and parallelizing it. 3. The response is an marshalled JSON object (using camel-jackso

Re: Bean component/Bean Binding: Body as InputStream parametr (specified as ${body} in route)

2013-10-01 Thread radek_kraus
Thanks for answer.. But IMHO it isn't "stream-caching" problem. I have stream-caching enabled by "camel-context" attribute: In addition, when I change the route, where I used bean component twice: I got this result: 2013-10-01 12:26:37.259 DEBUG {main} [SendProcessor] End

Consumer template get stuck when calling receive() with SMPP uri and getting a negative response.

2013-10-01 Thread mamouros
I am using the consumer template to receive deliver_sm from an smsc. exchange = consumer.receive("smpp://" + username + "@" + destination + ":" + port + "?password=" + password , timeoutInMillis); So far, so good but when it can't connect to the smsc (maybe because of wrong username or password),

Re: [ConsumerTemplate] CamelLocks deleted before file is completely processed

2013-10-01 Thread Aida
Hi, I have been investigating about this issue, because using the same ConsumerTemplate doesn´t seem to fix it. Just in case it can help somebody, I have seen that the MarkerFileExclusiveReadLockStrategy#deleteLockFiles method is called once per endpoint. So if two endpoints differ only in the "f

Re: Apache Camel - war project How to process the Queue and set to another queue?

2013-10-01 Thread James Carman
Have you tried turning up logging to see what's going on? Camel gets very descriptive at DEBUG level On Mon, Sep 30, 2013 at 11:17 AM, kosalads wrote: > Hi James, > > So how do we handle the below scenario with Camel? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.

Re: Jetty consumer - how to send reply?

2013-10-01 Thread Dale King
On Oct 1, 2013, at 2:14 AM, Claus Ibsen wrote: > You can do > > setBody(constant(new File(""))) That works if the file name is fixed at the time of route construction. The method I showed using simple and the built in conversion from string to File will allow you to determine the file nam

Re: [ConsumerTemplate] Concurrency problems in Camel 2.11.2 (attached test)

2013-10-01 Thread Aida
Hi, About reading files concurrently with the consumerTemplate, if this can help somebody in the future: I have found out that without using an implementation of GenericFileFilter in order to get the right file (but using the "fileName" endpoint parameter instead) there are no problems reading co

Re: SJMS component and IBM Websphere MQ quirks

2013-10-01 Thread nigel
Ah - no I didn't - that's much neater. Thanks -- View this message in context: http://camel.465427.n5.nabble.com/SJMS-component-and-IBM-Websphere-MQ-quirks-tp5740588p5740699.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel's use of jsch/java.io

2013-10-01 Thread neil
The code that pointed out is in java.io.PipedInputStream.read(). I believe Camel's thread management is triggering an infinite loop in it, although I am not certain. Is there a graceful way to have a Camel polling route completely reset itself periodically? Or is bouncing the container a better

Re: dynamicly change the url of the element after the camelcontext is started

2013-10-01 Thread salemi
Thank you Babak. Since we are using Camel 2.10 we are using the BridgePropertyPlaceholderConfigurer as followed below: How does BridgePropertyPlaceholderConfigurer with the PropertiesComponent? Thanks, Ali - Alireza Salemi -- View this message in context: http://came

Creating routes dynamically like a for()

2013-10-01 Thread mamouros
I would like to create a route for every query my sql route returns. >From this: from("sql:" + fromUri + "?dataSource=dataSource") .to("bean:SmsReceiver?method=creatingRoutes"); I want to make something hypothetically like this: for( from("sql:" + fromUri + "?dataSource=dataSource") ) {

Re: Creating routes dynamically like a for()

2013-10-01 Thread Dale King
Not clear what you are trying to achieve exactly, but I think what you want is the splitter which in this case you would use to execute the route for each record. Something like the following will call the method for each record returned from the SQL. from("sql:" + fromUri + "?dataSource=dataSo

Re: dynamicly change the url of the element after the camelcontext is started

2013-10-01 Thread Babak Vahdat
You can reach/do the same there as well see the setter method: BridgePropertyPlaceholderConfigurer#setResolver Through which you can inject your own PropertiesResolver implementation. So to recapitulate, just implement you own PropertiesResolver by extending DefaultPropertiesResolver. Then implem

Re: Invoking remote RESTful services urgent !!

2013-10-01 Thread Tracy Snell
Here's code I use to expose a REST url externally to an internal REST service. from(BASE_URI + "/doctor?bindingStyle=SimpleConsumer&resourceClasses=" + DoctorLookupService.class.getName()) .setHeader(Exchange.HTTP_URI, simple("http://my.company.com/CT/GetContac

SFTP component help: Reading only modified content of a file in regular invervals

2013-10-01 Thread gudiseashok
Hi Is there anyway to read only modified content from a file? I have a job scheduler which calls a remote directory which always have same set of files (a.log,a1.log,a2.log,a3.log) and It will replicated the same folder in local with those files, So If am reading same folder after 30 minutes, I

Re: Camel's use of jsch/java.io

2013-10-01 Thread Bengt Rodehav
Hello Neil, I use the sftp component quite a lot. Now and then (perhaps once in a month) it stops polling. I think the problem to that lies in the Jsch itself and not in Camel. I'm not sure if it is the same problem you have though. I also took stack traces and found that Jsch was stuck in a read

Re: contentObjectId in XML Security (camel-xmlsecurity)

2013-10-01 Thread atiato
Hi Claus , I didn't get any reply for this ? should we open this as JIRA ? thanks, Omar Atia -- View this message in context: http://camel.465427.n5.nabble.com/contentObjectId-in-XML-Security-camel-xmlsecurity-tp5740265p5740707.html Sent from the Camel - Users mailing list archive at Nabble.

Camel + myBatis Issue

2013-10-01 Thread Ankur
Hi all, I am copying data from one datadource to another datasource using mybatis component. i achieved it but during insertion i'm getting issues. how to perform batch insert using myBatis. Any other way as i'm using oracle database. Kindly help me to resolve this issue thanks -- View th

Updating properties via JMX

2013-10-01 Thread PMulido
I know properties can be updated in a running camel instance by updating the properties file directly. Is there any way to expose / update properties via JMX? The use case would be turning a property of SEND_EMAIL=true to false via JMX ? -- View this message in context: http://camel.465427.

Re: contentObjectId in XML Security (camel-xmlsecurity)

2013-10-01 Thread Claus Ibsen
We did some changes try with latest source code On Tue, Oct 1, 2013 at 6:55 PM, atiato wrote: > Hi Claus , > > I didn't get any reply for this ? should we open this as JIRA ? > > thanks, > Omar Atia > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/contentObjectId-in

Re: Bean component/Bean Binding: Body as InputStream parametr (specified as ${body} in route)

2013-10-01 Thread Claus Ibsen
Hi Yeah sounds like a bug. Do you mind logging a JIRA ticket? On Tue, Oct 1, 2013 at 11:25 AM, wrote: > Hello, > I am playing with "bean binding" on bean component. I know, that I can solve > my requirements by another way. > But anyway I think, that my "syntetic" example doesn't work how I ex

Re: Updating properties via JMX

2013-10-01 Thread Christian Müller
Did you checked http://camel.apache.org/camel-jmx.html ? Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html h

AW: Creating routes dynamically like a for()

2013-10-01 Thread jhm
What you could do is generating a xml file with the new route definitions and load that. http://camel.apache.org/loading-routes-from-xml-files.html from("sql ...") .process( generateRoutesXmlProcessor ) .doTypeConversionFromXmlToInputStream .process( loadRoutesProcessor ) Jan > -

Re: Apache Camel - Multicast - Is there a 'null' or a similar endpoint ?

2013-10-01 Thread Christian Müller
This doesn't sounds right. Can you provide a unit test which shows this behavior and attach it to a JIRA [1]!? [1] http://camel.apache.org/contributing.html Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel:

Scala DSL lacks a way to specify return type of language expressions

2013-10-01 Thread Dale King
The language support in the Scala DSL is too simplistic in that it does not support all the options of Java DSL. In particular it does not allow setting the return type of the expression. In my case I am trying to set a header to the result of an xpath count expression. In the Java DSL this fails

Re: Bean component/Bean Binding: Body as InputStream parametr (specified as ${body} in route)

2013-10-01 Thread Taariq Levack
If you're not aware and you need a workaround and this suits your scenario, you'll get the body as the InputStream if you don't use Simple. ie Taariq On Tue, Oct 1, 2013 at 9:35 PM, Claus Ibsen wrote: > Hi > > Yeah sounds like a bug. Do you mind logging a JIRA ticket? > > On Tue, Oct 1, 2013

Re: Creating routes dynamically like a for()

2013-10-01 Thread kraythe .
Just put the for outside. I do this all the time. for (final String path : paths) { from("file://" + path +"?readlock=changed").to(...) ... } This will create four identical routes other than the file paths. if there are four elements in paths. *Robert Simmons Jr. MSc. - Lead Java Architect @

Re: Apache Camel - Multicast - Is there a 'null' or a similar endpoint ?

2013-10-01 Thread kraythe .
It would work. Multicast doesnt indicate anything more than more than one destination. Those destinations could be two JMS queues, a queue and a log, whatever you like. All your code would do is log the message but if that is what you want then go for it. *Robert Simmons Jr. MSc. - Lead Java Archi

Re: Scala DSL lacks a way to specify return type of language expressions

2013-10-01 Thread kraythe .
Write an implicit conversion. Scala doesnt manage return types much. Its unnecessary baggage. I rather like that and wish I could use it in my work. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin

Re: Bean component/Bean Binding: Body as InputStream parametr (specified as ${body} in route)

2013-10-01 Thread Radek Kraus
Yes, I know it. It is enough to use second variant (the commented one) of bean component binding. I have already used it. I want only to know if using of simple language (${body}) is a problem, which should be fixed. I will create the JIRA ticket, how Claus suggested. Thanks all for help. -- V

Re: Updating properties via JMX

2013-10-01 Thread PMulido
We are using JMX within Camel and using JConsole to maniputes MBeans and routes / contexts etc. We are also using a jolokia agent and able to connect using hawtio. The issue is we can't seem to see properties within JMX that are loaded via org.springframework.beans.factory.config.ListFactoryBean

AW: Creating routes dynamically like a for()

2013-10-01 Thread jhm
Sure, RouteBuilders are just Java objects and can be configured in Java - Camel DSL is just Java and loops are available ;) But you have to distinguish when you get your path-list: during startup time or during runtime? Startup time: Use a DB connection / EntityManager for loading the infos from

"The Camel Components Poster" now available.

2013-10-01 Thread gliesian
For anyone who is interested: http://fineartamerica.com/featured/the-camel-components-poster-robert-liguori.html -- Robert. -- View this message in context: http://camel.465427.n5.nabble.com/The-Camel-Components-Poster-now-available-tp5740730.html Sent from the Camel - Users mailing list archi

Re: Apache Camel - Multicast - Is there a 'null' or a similar endpoint ?

2013-10-01 Thread Claus Ibsen
Hi Yeah I dont see a problem either. Multicast can be 1 or N destinations. Maybe you can try explain again what you see as a problem? and what you want to do be able to do instead. Are you wanting to do a multicast to zero destinations which doesnt make sense? On Wed, Oct 2, 2013 at 7:44 AM, k

Re: Bean component/Bean Binding: Body as InputStream parametr (specified as ${body} in route)

2013-10-01 Thread Radek Kraus
The JIRA issue was create https://issues.apache.org/jira/browse/CAMEL-6810. Thanks for help. -- View this message in context: http://camel.465427.n5.nabble.com/Bean-component-Bean-Binding-Body-as-InputStream-parametr-specified-as-body-in-route-tp5740656p5740741.html Sent from the Camel - Users

Re: Scala DSL lacks a way to specify return type of language expressions

2013-10-01 Thread Claus Ibsen
We love contributions, so fell free to work on adding the pieces in Scala DSL you would like. http://camel.apache.org/contributing.html On Wed, Oct 2, 2013 at 3:55 AM, Dale King wrote: > The language support in the Scala DSL is too simplistic in that it does not > support all the options of Jav