You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lleclerc <ll...@aim-rg.com> on 2013/04/25 15:46:02 UTC

Re: Ambiguity in DefaultCamelContext with TypeConverter

I have picked the code from OsgiCamelContextHelper to set the osgi parts, but
this helper do not apply for TypeConverter.

Here is the code for OsgiDefaultCamelContext :


It override the createTypeConverter() and addService is done while using a
getter from DefaultCamelContext (see my first post).

It is not a bug, I could go by creating a CamelContext which is GuiceOsgi. 
It's just that it would be cleaner to have a safe way to set the existing
parts instead of redefining the camelContext, but it will do the job.

Please let me know if it worth a change in DefaultCamelContext.



--
View this message in context: http://camel.465427.n5.nabble.com/Bug-in-DefaultCamelContext-with-TypeConverter-tp5731480p5731546.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Ambiguity in DefaultCamelContext with TypeConverter

Posted by lleclerc <ll...@aim-rg.com>.
JIRA : https://issues.apache.org/jira/browse/CAMEL-6321



--
View this message in context: http://camel.465427.n5.nabble.com/Ambiguity-in-DefaultCamelContext-with-TypeConverter-tp5731480p5731634.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Ambiguity in DefaultCamelContext with TypeConverter

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah the addService(typeConverter) should be moved to the doStartCamel
method, where we do this for others services.

Then we can remove that logic from createTypeConverter.

Fell free to log a JIRA and provide a patch.


On Thu, Apr 25, 2013 at 3:46 PM, lleclerc <ll...@aim-rg.com> wrote:
> I have picked the code from OsgiCamelContextHelper to set the osgi parts, but
> this helper do not apply for TypeConverter.
>
> Here is the code for OsgiDefaultCamelContext :
>
>
> It override the createTypeConverter() and addService is done while using a
> getter from DefaultCamelContext (see my first post).
>
> It is not a bug, I could go by creating a CamelContext which is GuiceOsgi.
> It's just that it would be cleaner to have a safe way to set the existing
> parts instead of redefining the camelContext, but it will do the job.
>
> Please let me know if it worth a change in DefaultCamelContext.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Bug-in-DefaultCamelContext-with-TypeConverter-tp5731480p5731546.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen