camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sub3 <st...@subwest.com>
Subject Re: Upgrading to 2.0 - Using FileExchange
Date Mon, 12 Oct 2009 13:50:59 GMT

Thanks.  That got me past the compilation errors, but I am not able to get it
to trigger in 2.0.  

Below is the same code from when I was integrated with 1.3.0 (Except
removing FileExchange).  I don't know if the file handling is correct, but
my problem is that I don't even get to that code.  process() never gets
called when files are dropped in.  Is there something new I need to do? 
Thanks.

				
from("file://"+dir).errorHandler(deadLetterChannel("bean:DeadLetterChannelProcessor/handleError").maximumRedeliveries(1)).process(new
Processor() {
  public void process(Exchange e) {
    logger.error("Exchanged called!!!");
    try {
      File file = (File)e.getIn();
      logger.debug("Filename: " + file.toString());
      long start = System.currentTimeMillis();
      FileInputStream fis = new FileInputStream(file);
      handle(fis, file);
      fis.close();
      long end = System.currentTimeMillis();
      logger.info(String.format(	"Runtime %1$d ms (%2$d to %3$d)",(end -
start), start, end));
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
});






Claus Ibsen-2 wrote:
> 
> On Fri, Oct 9, 2009 at 4:55 PM, sub3 <steve@subwest.com> wrote:
>>
>> I am trying to upgrade my system from 1.3.0 to 2.0.0.  I can't seem to
>> find
>> org.apache.camel.component.file.FileExchange.
>>
>> When I look at the javadocs online, it is there, but I can't find it in
>> any
>> of the jars. Do I need to compile it myself, or am I just overlooking
>> something?
>>
> 
> The javadocs online is outdated. The apache infrastructure is playing
> tricks on us so we cant always update it when we do new releases.
> 
> In Camel 2.0 there is only a single Exchange now =
> org.apache.camel.impl.DefaultExchange.
> There are no more specialized exchanges.
> 
> 
> 
>> Thanks for your help.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Upgrading-to-2.0---Using-FileExchange-tp25822604p25822604.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://www.nabble.com/Upgrading-to-2.0---Using-FileExchange-tp25822604p25856153.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message