camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Heavyweight Converter: Caching?
Date Wed, 27 Jan 2010 12:12:28 GMT
How did you user the TypeConverter?
If you can cache the CamelContext, I think you will create a new 
TypeConverter each time.
  With the recent change of CAMEL-2392[1], CamelContext will load the 
TypeConverter when the CamelContext is started.



waterback wrote:
> I have a big question regarding TypeConverters - how to cache a
> heavyweight-converter:
> Actually i have a TypeConverter using a Pojo for converting a
> COBOL-Object-Dump (don't ask!:), which is not as reentrant as the
> TypeConverter-Semantic requests it. 
> I have concurreny issues.
> The thing is - that Pojo is too heavyweight to make a new instance every
> time i want to use it:
> It does a lot of initializing stuff...
> Well that Pojo was used in a EJB-Environment before  - therefore it was
> instantiated for every instance of a SLSB and this worked fine since every
> thread had his own instance and the ejb container managed the caching of it
> How can i solve this in camel? I could imagine using a bean, or a Processor,
> but i can't see a solution without creating a new instance for every
> request. 
> Can i cache Processors or Beans and direct camel to use a different
> cache-object for every request?
> Thanx for any hint...
> regards, 
> martin

View raw message