Hi, The most straightforward way I can think of is to load the Object reference into a JNDI Registry and associated with the CamelContext during instantiation of using setters.
The reference can then be looked up as a when needed to get a reference to the TypeConverter. Check out the following link to see how this may be done. http://camel.apache.org/lucene.html http://camel.apache.org/lucene.html Cheers, Ashwin... Hope this helps. Cheers, Ashwin... 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 > > ----- --- Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence Progress Software Corporation 14 Oak Park Drive Bedford, MA 01730 --- +1-972-304-9084 (Office) +1-972-971-1700 (Mobile) ---- Blog: http://opensourceknowledge.blogspot.com/ -- View this message in context: http://old.nabble.com/Heavyweight-Converter%3A-Caching--tp27337830p27338179.html Sent from the Camel - Users mailing list archive at Nabble.com.
