Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 97847 invoked from network); 16 Jun 2009 12:33:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jun 2009 12:33:01 -0000 Received: (qmail 53890 invoked by uid 500); 16 Jun 2009 12:33:12 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 53871 invoked by uid 500); 16 Jun 2009 12:33:12 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 53861 invoked by uid 99); 16 Jun 2009 12:33:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 12:33:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.226 as permitted sender) Received: from [209.85.218.226] (HELO mail-bw0-f226.google.com) (209.85.218.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 12:33:00 +0000 Received: by bwz26 with SMTP id 26so3783622bwz.20 for ; Tue, 16 Jun 2009 05:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=Y/QlMM4IkRJlXI7Jmr/lA09xsRo6V1LbwbP5RYZ59oI=; b=DrCm5GFgrRMh973GSYLlbf0N31VWc2jqivEJH6lWSA4UgyfI8Po2NWyhUioOm1reVF uQg+tkQpmjqnVpAMHYuHI1hicrRpGahjX2ursuPXvdVUqPVUjS9ToUcjbO3UAjNbyB78 gE8qtj23sbMhy42/AzmyISvUNBKhY4b2QM/YM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=p1Ar9zb+1wd9Ma/w1B32X/0Q2xJnFk4yTSVbeSNbEULDg1ijSig2uWt3a69pDpBkRE Vp6OP+j1mGdB5TsGGfO7UHTH4hKcH2NfS15JqJlWQzKM4PHBJ34OJ/lkOGWayyOv6Vui h8CCe1/NhKV7GfqUQDfXxrD1QHDwRfg+wU/hk= MIME-Version: 1.0 Received: by 10.223.107.199 with SMTP id c7mr5336554fap.31.1245155559120; Tue, 16 Jun 2009 05:32:39 -0700 (PDT) In-Reply-To: <24053271.post@talk.nabble.com> References: <24053271.post@talk.nabble.com> From: Claus Ibsen Date: Tue, 16 Jun 2009 14:32:19 +0200 Message-ID: <5380c69c0906160532w500d79bbsfa24e48d9cb4e967@mail.gmail.com> Subject: Re: Avoiding type conversions with the direct component To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Its the stream cache that forces this. Use the google search bar to search for stream cache and see how to disable it. On Tue, Jun 16, 2009 at 2:26 PM, huntc wrote: > > Hi there, > > Quick (probably dumb) question. I'm looking to avoid a type conversion while > using the direct: component. > > I've been of the opinion that using the direct: component is a nice way to > break up my routes into nicely separated chunks. However I now find that > sending a body with one of my (large) POJOs takes several seconds. > > Having profiled things I see that there is a > "NoTypeConversionAvailableException" and then the stack trace shows that the > object is being converted to a string, which then goes on to call a lot of > JSON code I have. Here's a sample of the stack trace: > > > ... > com.classactionpl.gml.Feature.toString() > java.lang.String.valueOf(Object) > java.lang.StringBuilder.append(Object) > org.apache.camel.NoTypeConversionAvailableException.(Object, Class) > org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(Class, > Exchange, Object) > org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(Class, > Exchange, Object) > org.apache.camel.impl.MessageSupport.getBody(Class, Object) > org.apache.camel.impl.MessageSupport.getBody(Class) > org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, > AsyncCallback) > org.apache.camel.processor.DeadLetterChannel.process(Exchange, > AsyncCallback, DeadLetterChannel$RedeliveryData) > org.apache.camel.processor.DeadLetterChannel.process(Exchange, > AsyncCallback) > org.apache.camel.processor.Pipeline.process(Exchange, Exchange, > AsyncCallback, Iterator, AsyncProcessor) > org.apache.camel.processor.Pipeline.process(Exchange, AsyncCallback) > org.apache.camel.management.InstrumentationProcessor.process(Exchange, > AsyncCallback) > org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(Exchange, > AsyncCallback) > org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, > AsyncCallback) > org.apache.camel.processor.UnitOfWorkProcessor.process(Exchange, > AsyncCallback) > org.apache.camel.component.direct.DirectProducer.process(Exchange, > AsyncCallback) > org.apache.camel.processor.SendProcessor.process(Exchange, AsyncCallback) > org.apache.camel.management.InstrumentationProcessor.process(Exchange, > AsyncCallback) > org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(Exchange, > AsyncCallback) > org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, > AsyncCallback) > org.apache.camel.processor.DeadLetterChannel.process(Exchange, > AsyncCallback, DeadLetterChannel$RedeliveryData) > org.apache.camel.processor.DeadLetterChannel.process(Exchange, > AsyncCallback) > org.apache.camel.processor.Pipeline.process(Exchange, Exchange, > AsyncCallback, Iterator, AsyncProcessor) > org.apache.camel.processor.Pipeline.process(Exchange, AsyncCallback) > org.apache.camel.management.InstrumentationProcessor.process(Exchange, > AsyncCallback) > org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(Exchange, > AsyncCallback) > org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(Exchange, > AsyncCallback) > org.apache.camel.processor.UnitOfWorkProcessor.process(Exchange, > AsyncCallback) > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessor, Exchange) > org.apache.camel.processor.DelegateAsyncProcessor.process(Exchange) > org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(Exchange) > org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(JobExecutionContext) > org.apache.camel.component.quartz.CamelJob.execute(JobExecutionContext) > org.quartz.core.JobRunShell.run() > org.quartz.simpl.SimpleThreadPool$WorkerThread.run() > > > Any recommendations on how I should avoid this conversion? > > Kind regards, > Christopher > -- > View this message in context: http://www.nabble.com/Avoiding-type-conversions-with-the-direct-component-tp24053271p24053271.html > Sent from the Camel - Users (activemq) 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