Re: Camel 2.0 - About type converter degrade performance issue

2009-03-19 Thread Claus Ibsen
On Thu, Mar 19, 2009 at 4:09 PM, Willem Jiang wrote: > Hi Claus, > > Current servicemix-camel component is still using Camel 1.x. > > I just went through the code and found that camel-jbi component uses the > ExchangeHelper.convertToType() to covert the camel message body into a > Source object fo

Re: Camel 2.0 - About type converter degrade performance issue

2009-03-19 Thread Willem Jiang
Hi Claus, Current servicemix-camel component is still using Camel 1.x. I just went through the code and found that camel-jbi component uses the ExchangeHelper.convertToType() to covert the camel message body into a Source object for JBI to use. I think it is OK for this change. willem Claus Ibs

Re: Camel 2.0 - About type converter degrade performance issue

2009-03-19 Thread Claus Ibsen
Hi Could you test on the SMX side? We have changed how the getBody(Class type) behaves. Now it returns null if it cannot convert. You should use the getMandatoryBody(Class type) instead if you want to be sure the payload can be converted. Maybe it affects the camel-jbi component in SMX. On Th

Re: Camel 2.0 - About type converter degrade performance issue

2009-03-19 Thread Claus Ibsen
Hi I had a chat with James about it, and we came to a conclusion. See the JIRA for summary. I am running final unit tests now on the change. Will commit later today if all passes. On Wed, Mar 18, 2009 at 2:53 PM, William Tam wrote: > +1 on overloading methods. > > On Wed, Mar 18, 2009 at 7:22

Re: Camel 2.0 - About type converter degrade performance issue

2009-03-18 Thread William Tam
+1 on overloading methods. On Wed, Mar 18, 2009 at 7:22 AM, Claus Ibsen wrote: > Hi > > Any thoughts on this one? > > It all boils down to a suggestion to add 1 methods to the > org.apache.camel.Message API > > new method: > - tryGetBody(Class type) > > or overload existing with a boolean to indi

Re: Camel 2.0 - About type converter degrade performance issue

2009-03-18 Thread Claus Ibsen
Hi Any thoughts on this one? It all boils down to a suggestion to add 1 methods to the org.apache.camel.Message API new method: - tryGetBody(Class type) or overload existing with a boolean to indicate ignore exception and return null - getBody(Class, true) The same applies for the org.apache.c

Camel 2.0 - About type converter degrade performance issue

2009-03-15 Thread Claus Ibsen
Hi In Camel 1.6.0 and 2.0 we have had a performance issue that could seriously degrade performance by x2-x10 when you did stress test by sending > 1000 msg/sec. The cause of this is the TypeConverter that will throw a NoSuchTypeConverterExists when Camel cannot converter to the desired type. We d