It could be more safe to put the state into the exchange property, as the 
message header will be override or lost through the processors.  

--  
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, January 29, 2013 at 6:54 AM, Christian Müller wrote:

> Camel share one concrete processor instance (say processor 1) for all
> exchanges which may run in parallel. This means your processor should be
> stateless.
> If you have to maintain state between different processors, put this state
> into the exchange as property or into the (in) message as header.
>  
> Best,
> Christian
>  
> On Mon, Jan 28, 2013 at 7:25 AM, AMARNATH, Balachandar <
> balachandar.amarn...@airbus.com (mailto:balachandar.amarn...@airbus.com)> 
> wrote:
>  
> > Further to my below query, I also need to pass few parameters from one
> > process to another process, this means that process 2 takes the one of the
> > outputs of process 1 and process it along with manual output.
> >  
> > Also, there is big probability that processes can be run in parallel. Is
> > camel support concurrent execution of processes (that are independent to
> > each other) ? If yes, can some one point me to correct resources?
> >  
> > With thanks and regards
> > Bala
> >  
> >  
> >  
> >  
> > -----Original Message-----
> > From: AMARNATH, Balachandar [mailto:balachandar.amarn...@airbus.com]
> > Sent: 28 January 2013 11:42
> > To: users@camel.apache.org (mailto:users@camel.apache.org)
> > Subject: RE: issues with simple example
> >  
> > Hello,
> >  
> > Thanks for the help,
> >  
> > Now, I need to pass a set of strings (say, in a arrayList). This list need
> > to be processed by the processor code. Now, which endpoint will be suitable
> > to give this list as an input?
> > Further, I have observed that when I use an endpoint like this
> > 'from::<loc_of_file>', at the end, the file is removed from the location.
> > What is the way to prevent this behaviour?
> >  
> >  
> > With regards
> > Balachandar
> >  
> > -----Original Message-----
> > From: Christian Müller [mailto:christian.muel...@gmail.com]
> > Sent: 25 January 2013 01:47
> > To: users@camel.apache.org (mailto:users@camel.apache.org)
> > Subject: Re: issues with simple example
> >  
> > The file endpoint should be a directory and not a file.
> >  
> > Sent from a mobile device
> > Am 24.01.2013 12:33 schrieb "AMARNATH, Balachandar" <
> > balachandar.amarn...@airbus.com (mailto:balachandar.amarn...@airbus.com)>:
> >  
> > > I am new to camel and trying to run a simple example. I have the
> > following
> > > classes constitute a simple route which I am not able to run it.
> > >  
> > > public class CamelStarter {
> > >  
> > > /**
> > > * @param args
> > > */
> > > public static void main(String[] args) throws Exception {
> > > // TODO Auto-generated method stub
> > > CamelContext context = new DefaultCamelContext();
> > > context.addRoutes((RoutesBuilder) new
> >  
> >  
> > IntegrationRoute());
> > > context.start();
> > > context.stop();
> > >  
> > > }
> > >  
> > > }
> > >  
> > >  
> > > public class IntegrationRoute extends RouteBuilder {
> > >  
> > > @Override
> > > public void configure() throws Exception {
> > > from("file:///home/bala/input.txt").process(new
> > > simpleProcessor()).toString();
> > >  
> > > }
> > >  
> > > }
> > >  
> > > public class simpleProcessor implements Processor {
> > >  
> > > @Override
> > > public void process(Exchange arg0) throws Exception {
> > > // TODO Auto-generated method stub
> > > System.out.println("Received
> > > "+arg0.getIn().getBody(String.class));
> > > }
> > >  
> > > }
> > >  
> > >  
> > > I compiled all the classes and ran CamelStarter class. It goes to the
> > > configure() method and after that, I am not seeing any more output. No
> > > error. I expect the code in process() be executed and print something
> >  
> >  
> > which
> > > is not happening.
> > > Can someone give me a hint here?
> > >  
> > >  
> > > Many thanks and regards
> > > Bala
> > >  
> > >  
> > >  
> > > With thanks and regards
> > > Balachandar
> > >  
> > >  
> > >  
> > >  
> > > The information in this e-mail is confidential. The contents may not be
> > > disclosed or used by anyone other than the addressee. Access to this
> >  
> >  
> > e-mail
> > > by anyone else is unauthorised.
> > > If you are not the intended recipient, please notify Airbus immediately
> > > and delete this e-mail.
> > > Airbus cannot accept any responsibility for the accuracy or completeness
> > > of this e-mail as it has been sent over public networks. If you have any
> > > concerns over the content of this message or its Accuracy or Integrity,
> > > please contact Airbus immediately.
> > > All outgoing e-mails from Airbus are checked using regularly updated
> >  
> >  
> > virus
> > > scanning software but you should take whatever measures you deem to be
> > > appropriate to ensure that this message and any attachments are virus
> >  
> >  
> > free.
> >  
> >  
> >  
> > This mail has originated outside your organization, either from an
> > external partner or the Global Internet.
> > Keep this in mind if you answer this message.
> >  
> >  
> >  
> > The information in this e-mail is confidential. The contents may not be
> > disclosed or used by anyone other than the addressee. Access to this e-mail
> > by anyone else is unauthorised.
> > If you are not the intended recipient, please notify Airbus immediately
> > and delete this e-mail.
> > Airbus cannot accept any responsibility for the accuracy or completeness
> > of this e-mail as it has been sent over public networks. If you have any
> > concerns over the content of this message or its Accuracy or Integrity,
> > please contact Airbus immediately.
> > All outgoing e-mails from Airbus are checked using regularly updated virus
> > scanning software but you should take whatever measures you deem to be
> > appropriate to ensure that this message and any attachments are virus free.
> >  
> >  
> > The information in this e-mail is confidential. The contents may not be
> > disclosed or used by anyone other than the addressee. Access to this e-mail
> > by anyone else is unauthorised.
> > If you are not the intended recipient, please notify Airbus immediately
> > and delete this e-mail.
> > Airbus cannot accept any responsibility for the accuracy or completeness
> > of this e-mail as it has been sent over public networks. If you have any
> > concerns over the content of this message or its Accuracy or Integrity,
> > please contact Airbus immediately.
> > All outgoing e-mails from Airbus are checked using regularly updated virus
> > scanning software but you should take whatever measures you deem to be
> > appropriate to ensure that this message and any attachments are virus free.
>  
>  
>  
>  
> --  


Reply via email to