sftp not throwing exception

2013-03-19 Thread sarfaraj
Hi,

I am using the sftp component(2.8.5). When I passed wrong credential or
invalid IP, it doesn't throws any exception. That is why I could not
recognized is connection established or not. Could someone tell me how to
throw exception in such case.

FYI: the route is 

http://camel.apache.org/schema/spring";>


java.lang.Exception


true






ftp://root@10.0.0.1//temp?password=test123&throwExceptionOnConnectFailed=true&noop=true";
/>







--
View this message in context: 
http://camel.465427.n5.nabble.com/sftp-not-throwing-exception-tp5729470.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: oracle.jms.AQjmsFactory and javax.sql.DataSource

2013-03-19 Thread jinaLu
If I don't use datasource and specify like this:




jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=mydb)))











db


password







Then it works, but I have a restriction, that I have to use datasource. Any
ideas?



--
View this message in context: 
http://camel.465427.n5.nabble.com/oracle-jms-AQjmsFactory-and-javax-sql-DataSource-tp5729223p5729471.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: camel http- to call https service does not import certificates automatically

2013-03-19 Thread Siano, Stephan
Hi,

Why would you even want to import certificates automatically? This is 
absolutely not the way TLS/SSL (and the whole X.509 stuff) is supposed to work. 
Automatically importing SSL certificates will open up your communication to 
active (man-in-the-middle) attacks.

What you probably want to do if you are communicating with different servers is 
to import the Root-CA certificate where the signing chain of the server 
certificates start. If the server certificates are properly signed, manually 
importing that root certificate instead of each single server certificate is 
sufficient.

Best regards
Stephan

-Original Message-
From: preety somani [mailto:preety.som...@i-exceed.com] 
Sent: Mittwoch, 20. März 2013 06:07
To: users@camel.apache.org
Subject: Re: camel http- to call https service does not import certificates 
automatically

Hi,

  can you tel me what I need to add to import the certificate
automatically?Also, it hits the https service only when the certificate is
manually imported to the java cacerts file and not my user defined keystore.
Can you tel me what I am doing wrong

Thanks,
Preety



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-http-to-call-https-service-does-not-import-certificates-automatically-tp5729413p5729467.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel http- to call https service does not import certificates automatically

2013-03-19 Thread preety somani
Hi,

  can you tel me what I need to add to import the certificate
automatically?Also, it hits the https service only when the certificate is
manually imported to the java cacerts file and not my user defined keystore.
Can you tel me what I am doing wrong

Thanks,
Preety



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-http-to-call-https-service-does-not-import-certificates-automatically-tp5729413p5729467.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: oracle.jms.AQjmsFactory and javax.sql.DataSource

2013-03-19 Thread Willem jiang
Hi,

Did you have any Spring configuration which works?
It looks like a configuration issue instead of camel issue.



--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 19, 2013 at 10:23 PM, jinaLu wrote:

> I tried like this. In fuseEsb etc xml file I have config:
>  
>  destroy-method="close">
> 
>  value="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=mydb)))"/>
> 
> 
> 
> 
>  class="lt.etic.smx.tools.cfgmgr.impl.jdbc.JdbcConnectionProbe">
> 
> 
> 
>   
>  
> In my blueprint xml I have:
>  filter="(name=oracle-AQ)"/>
>  class="oracle.jms.AQjmsFactory"
> factory-method="getQueueConnectionFactory">
> 
> 
>  
>  class="org.apache.camel.component.jms.JmsComponent">
>  ref="connectionFactoryOracleAQQueue" />
> 
> My ruoteBuilder has:
> from("direct:test")
> .to("oracleQueue:queue:AQ_Q")
>  
> But unfortunately I'm getting "Caused by: java.lang.ClassCastException:
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot
> be cast to oracle.jdbc.internal.OracleConnection".
>  
> Any ideas?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/oracle-jms-AQjmsFactory-and-javax-sql-DataSource-tp5729223p5729423.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).





Camel FTP is not consuming large files

2013-03-19 Thread akcameluser
Hi

I have an OSGI Bundle deployed on ServiceMix. Currently it's consuming files
from a remote FTP server up to 300 MB of size. If I drop a 500 MB file (zip
file) it doesn't get picked up and I can't see anything on the log. I have
also noticed that if I drop a small file while the big file is still there,
the smaller file gets consumed. This seems to show that Camel FTP is
ignoring large files. 

Any idea how to consume large files? And how best to consume them?

Many thanks in advance.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-FTP-is-not-consuming-large-files-tp5729459.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel receipient list with interceptor

2013-03-19 Thread santhosh
My architecture needs to multicast to multiple endpoints which will be
constructed dynamically and before the message is sent to end point it needs
to be customized.Now its like

  




  

  


Sending to A 

http://A.com";>
  

Now we are moving away from static recipient list  list to dynamic recipient
list





** 

 

The method routeTo will return url like A.com,B.com(left out http protocal
due to hyperlink issues) ... depending upon incoming message.i am  assuming
camel-http will automatically take care of endpoint creation.correct me if i
am wrong.

Everything is same as previous but except i am trying to do everything
within multicast /recipientList  list without defining additional routes
because i dont know the routes during compile time. 
1)Can i use onPrep processor in some way.cant think of it because i dont
know which exchange is used for which endpoint.If i know endpointin
exchange properties , then i think i can manipulate it

very high level of something what i think

public class OnPrepare   implements Processor {
  public void process(Exchange exchange) throws Exception {
//i know this function doesnt exist  
   String toURI=exchange.getTOUri() 
  //then perform endpoint based manipulation of message


}

}
  
Can opPrep be used for this.is it only for things like clone.

2)Can i use intercept only for receipient list only.
 Problems:
1)i dont want to use intercept for whole route and filter based on
predicate.
2)I cant use interceptToSendEndpoint because i dont know endpoint at compile
time.
3)In short,i want to intercept the message. In multicast ,say if its sent to
Endpoint A then add header A in intercept bean.In multicast ,say if its sent
to Endpoint B then add header B in intercept bean.Noting Endpoint A  and
Endpoint B will be constructed dynamically and will be in multicast as
probably receipient list.

Can this be done.

3)Whats the best way of doing it.I dont want to move away from Spring DSL.I
know i can mix  spring DSL and java DSL.DO you guys think i should
dynamically construct routes/Endpoints using java DSL and invoke them in
multicast/recipientList in spring DSL.Rewrite Entire code in java DSL is the
last option.

Thanks for reading such a long post.Much appreciated.Please let me know if
its confusing. It would be nice if you can answer all three or whichever you
know.






--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-receipient-list-with-interceptor-tp5729462.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel http- to call https service does not import certificates automatically

2013-03-19 Thread santhosh
Your progam/code wont and its not coded that way.You have to update the
keystore and truststore manually.Updating manually in sense i am assuming
you mean

keytool -import -keystore keystore.jks -file key.txt -alias xyz .





--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-http-to-call-https-service-does-not-import-certificates-automatically-tp5729413p5729461.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to schedule FTP with quartz?

2013-03-19 Thread Chris Wolf
On Mon, Mar 18, 2013 at 4:57 PM, Pontus Ullgren  wrote:
> Hello Chris,
>
> On Mon, Mar 18, 2013 at 8:54 PM, Chris Wolf  wrote:
>> Claus,
>>
>> I have a few further questions about CronScheduledRoutePolicy.  I
>> noticed that it has setters such as setRouteStartTime,
>> setRouteStopTime, each which takes a cron expression string.  What I'm
>> looking for is to be able to use a cron expression for the start, but
>> a relative time length for stop.   Otherwise, I need to write code to
>> parse the start time expression, then calculate a stop time cron
>> expression.  Any ideas?
>>
> Depending on your needs you could enable "sendEmptyMessageWhenIdle" on
> the endpoint and then suspend the route when you receive a empty
> message. Which means that there is no more files to poll at the
> moment.
> You can use the content based route EIP for this.

That is interesting to know, thanks.  In my case, the files at the
remote end are themselves deposited at an irregular rate, but within a
defined time window, so during that time window, there will be
intermittent idleness...
>
> Another solution would be to write your own RoutePolicy to take care
> of your needs.

Yes, this sounds like the best approach...


>
> I just started to wonder if it might be possible to combine the
> CronScheduledRoutePolicy with a SimpleScheduledRoutePolicy.
> I have _not_ tested this so I'm not sure if it works. It might be that
> there is a collision in the way they work with Quartz.
>
>> Also I see that CronScheduledRoutePolicy has setRouteResumeTime,
>> setRouteSuspendTime such that for my FTP poll window, I could either
>> do start/stop or resume/suspend - which is recommended?
>>
> I would highly recommend resume/suspend.
> I've had some thread leak problem with the file component when it was
> repetitively started/stopped.

Ok, but I guess the first policy callback with be onStart since the
route will be
configured with noAutoStartup(), so upon that first onStart, I'll
suspend then toggle
between onSuspend/onResume...

>
> // Pontus
>
>> Thanks,
>>
>> Chris
>>
>> On Sat, Mar 2, 2013 at 1:43 AM, Claus Ibsen  wrote:
>>> Hi
>>>
>>> See about route policy
>>> http://camel.apache.org/routepolicy
>>>
>>> And the scheduled route policy
>>> http://camel.apache.org/scheduledroutepolicy.html
>>>
>>> On Sat, Mar 2, 2013 at 12:15 AM, Chris Wolf  wrote:
 I have a requirement to download files via FTP during a certain time
 window and according to a schedule. e.g. Only on trading days between
 6:30AM and 7:00AM.  The FTP component, alone, seems to just do
 indefinite polling according to delay/initialDelay.

 From the "Camel In Action" book, chapter 7, I see some examples of
 sending a text message with the Timer and Quartz components, but I
 can't quite see how to put that together to implement "kicking off
 routes at specified intervals", mentioned in the best practices list
 at the end of that chapter.  How would I use quartz to stop/start the
 FTP component, or the route that it's in?

 Thanks,

 Chris
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Email: cib...@redhat.com
>>> Web: http://fusesource.com
>>> Twitter: davsclaus
>>> Blog: http://davsclaus.com
>>> Author of Camel in Action: http://www.manning.com/ibsen


Unmarshal CSV but continue route with unaltered message

2013-03-19 Thread mdo
Hello,

I'm looking for a solution for processing (CSV) files with this flow:
 * consume a list of CSV files (file:///incoming/)
 * unmarshal the CSV contents of each file and process it with a bean
 * if the processing was successful move the corresponding file to directory
A
 * otherwise move it to B

When I unmarshal the CSV the in-message gets altered. I could reassemble the
CSV in the end but I doubt that this is the most effective way. Another
solution was to apply some sort of claim check EIP in order to restore the
in-message after the processing.

Is there a more straightforward way of doing this?

Thanks, mdo.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Unmarshal-CSV-but-continue-route-with-unaltered-message-tp5729446.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel SQL component - How configure sql component to doesn't try read the body?

2013-03-19 Thread Gardella juan
Hi,

I have a route that is processing a file. So the body is an input stream. I
want in some part of the route do two sequential operations. So I am using
something like that:

from("direct:foo").multicast().to(
"sql:truncate table X",
"direct:continue");

If I do that, sql read a portion of the input stream. I can solve if I
change the route to

from("direct:foo").streamCaching().multicast().to(
"sql:truncate table X",
"direct:continue");

But I do not want add streamCaching() only for the reason that sql component
can not configure to do not read the body. Is it possible configure sql
component to does not read message body?

Thanks,
Juan



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-SQL-component-How-configure-sql-component-to-doesn-t-try-read-the-body-tp5729434.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Simple expression in spring XML not work if it come in multiple xml line

2013-03-19 Thread Darwish
Thanks Claus ,

isseue created @ https://issues.apache.org/jira/browse/CAMEL-6179




-
Othman Darwish
ProgressSoft Corp.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Simple-expression-in-spring-XML-not-work-if-it-come-in-multiple-xml-line-tp5729408p5729426.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Simple expression in spring XML not work if it come in multiple xml line

2013-03-19 Thread Claus Ibsen
On Tue, Mar 19, 2013 at 3:01 PM, Darwish  wrote:
> Hi,
>
> camel version is : 2.10.1
>

Yeah we should add a single space when connecting the lines. Feel free
to log a JIRA ticket
http://camel.apache.org/support

>
>
>
> -
> Othman Darwish
> ProgressSoft Corp.
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Simple-expression-in-spring-XML-not-work-if-it-come-in-multiple-xml-line-tp5729408p5729421.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: oracle.jms.AQjmsFactory and javax.sql.DataSource

2013-03-19 Thread jinaLu
I tried like this. In fuseEsb etc xml file I have config:












 

In my blueprint xml I have:
 







My ruoteBuilder has:
from("direct:test")
.to("oracleQueue:queue:AQ_Q")

But unfortunately I'm getting "Caused by: java.lang.ClassCastException:
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot
be cast to oracle.jdbc.internal.OracleConnection".

Any ideas?



--
View this message in context: 
http://camel.465427.n5.nabble.com/oracle-jms-AQjmsFactory-and-javax-sql-DataSource-tp5729223p5729423.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Simple expression in spring XML not work if it come in multiple xml line

2013-03-19 Thread Darwish
Hi, 

camel version is : 2.10.1




-
Othman Darwish
ProgressSoft Corp.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Simple-expression-in-spring-XML-not-work-if-it-come-in-multiple-xml-line-tp5729408p5729421.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Binding IN and OUT message using annotation

2013-03-19 Thread Claus Ibsen
On Tue, Mar 19, 2013 at 2:02 PM, Gert Villemos  wrote:
> In an inOut route I would like to bind the IN and the OUT message to method
> parameters using annotations. Something like;
>
> public void foo(@body String inMessage, @X String outMessage)
>
> I cant find this in the annottation description.
>

The out message is what you return from the method. So change the void
to String.


>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Binding-IN-and-OUT-message-using-annotation-tp5729418.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Binding IN and OUT message using annotation

2013-03-19 Thread Gert Villemos
In an inOut route I would like to bind the IN and the OUT message to method
parameters using annotations. Something like;

public void foo(@body String inMessage, @X String outMessage)

I cant find this in the annottation description.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Binding-IN-and-OUT-message-using-annotation-tp5729418.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel http- to call https service does not import certificates automatically

2013-03-19 Thread preety somani
public void configureHttpClient(HttpClient arg0) {
String keystoreFilename = "C:\\Users\\.keystore";   

char[] password = "Password".toCharArray();

  log.info("configureHttpClient"+arg0.getPort());
  FileInputStream fIn = new 
FileInputStream(keystoreFilename);
trustStore  = 
KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(fIn,password);
 sslProtocolsocketFactory = new SSLProtocolSocketFactory();
 sslsocketFactory = new
SSLSocketFactory(trustStore,"changeit",trustStore);

SchemeRegistry schemeReg = new SchemeRegistry();
schemeReg.register(new 
Scheme("https",sslsocketFactory,8443));
 Protocol authhttps;
 
  authhttps = new Protocol("https",sslProtocolsocketFactory, 8443); 
 Protocol.registerProtocol("https", authhttps); 
  Protocol.registerProtocol("https", authhttps);
  log.debug("authhtps: scheme"+authhttps.getScheme());
}

I have written my httpclientconfigurer class which implements
httpclientconfigurer.  I have also added this in the camelcontext endpoint
as httpClientConfigurerRef=myClientConfigurerClass. But this does not import
the certificates automatically . It only hits the services whose
certificates I have imported manually to my keystore.

Can someone tell me why this does not work?





--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-http-to-call-https-service-does-not-import-certificates-automatically-tp5729413.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Simple expression in spring XML not work if it come in multiple xml line

2013-03-19 Thread Claus Ibsen
Hi

What Camel version do you use?

On Tue, Mar 19, 2013 at 12:51 PM, Darwish
 wrote:
> Hi ,
>
> if I have a simple expression like this (its auto formatted by my eclipse
> xml editor) :
>
> ${property.p1} contains 'xyz' and
> ${property.p2} contains 'false'
> 
>
> it won’t work ,since the XML will be parsed as : and${property.p2} , the
> carriage return/line feed will be trimmed which lead to simple expression
> parsing exception .
>
> to overcome ,I increase my editor line width so the  simple expression
> formatted in one single line !
>
> Any suggestion?
>
>
>
>
> -
> Othman Darwish
> ProgressSoft Corp.
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Simple-expression-in-spring-XML-not-work-if-it-come-in-multiple-xml-line-tp5729408.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel-FTP component on cluster

2013-03-19 Thread Claus Ibsen
On Tue, Mar 19, 2013 at 12:34 PM, yogu13  wrote:
> Hi Claus,
>
> Can you let us know what do you mean by "Though an alternative is to use a
> shared idempotent repository that the ftp consumer can use. That is a bit
> special as the file/ftp consumer has this functionality built-in"
>

Yeah this allows you to have all nodes in the cluster be active and
try to pickup FTP files.
And with a shared idempotent repository configured on them, this can
ensure a file
is only being picked up by a single node.


Where as the "Camel cluster" using quartz, hazelcast etc. is using a
strategy of one node
being a master, and the others slaves. And when the master dies, one
of the slaves become the new master etc.
But then there is only one active node running.






> As mentioned will try to search the discussion group as well on clustered
> camel.
>
> Thank you!
>
> Regards,
> -Yogesh
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-FTP-component-on-cluster-tp5729403p5729407.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel-FTP component on cluster

2013-03-19 Thread yogu13
Hi Claus,

Can you let us know what do you mean by "Though an alternative is to use a
shared idempotent repository that the ftp consumer can use. That is a bit
special as the file/ftp consumer has this functionality built-in"

As mentioned will try to search the discussion group as well on clustered
camel.

Thank you!

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-FTP-component-on-cluster-tp5729403p5729407.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-FTP component on cluster

2013-03-19 Thread Claus Ibsen
Hi

This has been debated before about cluster Camel. Maybe you can search
the forum and find some of these talks.

You can use a route policy to control which route is master / slave etc
http://camel.apache.org/routepolicy

And use some different technologies for that such as quartz,
hazelcast, zookeeper, et all.
Or write some custom code etc.

And in Fuse ESB Enterprise there is a Camel master component out of
the box that does this for you.

Though an alternative is to use a shared idempotent repository that
the ftp consumer can use.
That is a bit special as the file/ftp consumer has this functionality
built-in. Not all Camel consumers offers that.
And hence why a general solution with the route policy can be used.



On Tue, Mar 19, 2013 at 10:03 AM, yogu13  wrote:
> Hi,
>
> I would like to know if the camel-FTP component supports cluster? we have a
> requirement of downloading files kept at FTP location and processing these
> files once downloaded. List of Software's which are used in the
> application:-
>
> Camel - version 2.10.1
> JDK - version 1.6.37
> Server - Tomcat 7
>
> Our Camel Application is bundled into a WAR and deployed on to tomcat and
> expected to run on cluster in production. According to my understanding of
> the component the camel-ftp endpoint would be running on both the nodes in
> tomcat cluster and would download the same files simultaneously and start
> processing, which is not what we want. We would like only one of the nodes
> to download the file and process it accordinly...
>
> Please clarify if my understanding is right and also let me know options
> that we have to get this functionality done using camel.
>
> I am also thinking on the lines of using Quartz and having it to poll ever
> 10 seconds to FTP location and download the file if found and process it as
> Quartz supports clustering but with this option i think we will have to
> write a custom processor code for checking the ftp location and downloading
> instead of reusing the camel-ftp endpoint.
>
> Thanks in advance...
>
> Cheers!
> -Yogesh
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-FTP-component-on-cluster-tp5729403.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Camel-FTP component on cluster

2013-03-19 Thread yogu13
Hi,

I would like to know if the camel-FTP component supports cluster? we have a
requirement of downloading files kept at FTP location and processing these
files once downloaded. List of Software's which are used in the
application:-

Camel - version 2.10.1 
JDK - version 1.6.37
Server - Tomcat 7

Our Camel Application is bundled into a WAR and deployed on to tomcat and
expected to run on cluster in production. According to my understanding of
the component the camel-ftp endpoint would be running on both the nodes in
tomcat cluster and would download the same files simultaneously and start
processing, which is not what we want. We would like only one of the nodes
to download the file and process it accordinly...

Please clarify if my understanding is right and also let me know options
that we have to get this functionality done using camel. 

I am also thinking on the lines of using Quartz and having it to poll ever
10 seconds to FTP location and download the file if found and process it as
Quartz supports clustering but with this option i think we will have to
write a custom processor code for checking the ftp location and downloading
instead of reusing the camel-ftp endpoint.

Thanks in advance...

Cheers!
-Yogesh




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-FTP-component-on-cluster-tp5729403.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Regarding File Transfer

2013-03-19 Thread Claus Ibsen
Hi

If you are new to Camel I suggest you spend some time reading this article
http://java.dzone.com/articles/open-source-integration-apache

As well maybe some of the Camel introductions we have listed here
http://camel.apache.org/articles.html

And then learn a bit about the Enterprise Integration Patterns
http://camel.apache.org/eip

And there is the message translator eip which can be used to modify a message
http://camel.apache.org/message-translator.html

On Tue, Mar 19, 2013 at 9:10 AM, Krishna.aradhya
 wrote:
>
>   Ya Thank you,
>
>   How can i modify the transfering file from source to
> destination during run time.?
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Regarding-File-Transfer-tp5729342p5729400.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Routing an ObjectMessage in ActiveMQ

2013-03-19 Thread Matthieu Vincent
Thanks Christian for the hint, I'll have a look at it.

I found a workaround yesterday, as server and client know entities I've
switched my messages to BytesMessage and it did the trick.

Regards,
Matthieu


2013/3/18 Christian Müller 

> Try stream caching as described here:
> http://camel.apache.org/stream-caching.html
>
> Best,
> Christian
>
> On Mon, Mar 18, 2013 at 4:15 PM, yodamad  wrote:
>
> > Hi,
> >
> >  I'm facing the same problem using camel 2.8 in servicemix 4.4.1.
> > Does anyone find a solution for this "issue" ?
> >
> > Thanks
> > Mat
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Routing-an-ObjectMessage-in-ActiveMQ-tp5717965p5729353.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
>
> --
>


Re: Populate message with BeanInvocation

2013-03-19 Thread Lars-Erik Helander
What I would like is really somthing similar to .bean(...) where the bean class 
and method name is specified to a processor/bean and after invocation of that 
processor the exchange message body is populated with the appropriate bean 
invocation. Very much like a camel proxy but expressing the method name in the 
"DSL" and input parameters in the input message to the processor. 
Another alternative for me would be to use my own processor that would call a 
proxy, but I need that proxy to use the current exchange (and not the one 
produced by the proxy) or someway to populate the proxy's exchange (or message 
headers) with data from the current exchange prior to sending the to the 
proxy's endpoint.

Thanks
Lars

Skickat från min iPhone

19 mar 2013 kl. 03:38 skrev Willem jiang :

> It could be done by writing a custom TypeConverter[1], and you can turn the 
> message body into BeanInvocation like this
> from(xxx).setBody(body(BeanInvocation.class))
> 
> [1] http://camel.apache.org/type-converter.html  
> 
> --  
> Willem Jiang
> 
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
> (English)
>  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang  
> Weibo: 姜宁willem
> 
> 
> 
> 
> 
> On Tuesday, March 19, 2013 at 4:15 AM, helander wrote:
> 
>> In a route I would like to fill the message with a BeanInvocation, the same
>> way as when using .bean(), but I do not want the bean method to be
>> called. Is there some easy way to do this (preferably using similar syntax
>> as when using .bean() ) ?
>> 
>> Thanks
>> Lars
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/Populate-message-with-BeanInvocation-tp5729373.html
>> Sent from the Camel - Users mailing list archive at Nabble.com 
>> (http://Nabble.com).
> 
> 
>