camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <>
Subject [jira] Commented: (CAMEL-775) camel osgi DynamicImport-Package
Date Wed, 10 Sep 2008 07:44:52 GMT


Guillaume Nodet commented on CAMEL-775:

I don't think dynamic imports are actually needed.
What happens is that the ResolverUtil scans all the osgi bundles for META-INF/services/org/apache/camel/TypeConverter.
When one is found, it contains a list of packages that contains converters.
Then, the ResolverUtil looks for all the classes in these packages from all bundles and tries
to load these classes.
Such converters have to be either annotated with the @Converter annotation or implement the
TypeConverter class.
This means that the bundles containing these converters has to import the needed camel packages
in some way.
You could use dynamic imports or static imports.  I would recommend using static imports.
What we need is to come with a list of the imports that the user needs to add on his bundle
to be able to make the discovery process work easily.
I may be wrong, but for annotated converters, i think a static import of org.apache.camel
package should be sufficient.

I agree the discovery process in OSGi could be a bit smarter and look for some camel specific
MANIFEST entry, but this would not change the fact that the bundle has to import the needed

> camel osgi DynamicImport-Package
> --------------------------------
>                 Key: CAMEL-775
>                 URL:
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-osgi
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>             Fix For: 1.5.0
> See parent issue.
> Thanks Claus. I hope this can help getting it resolved. Let me know if it is, even a
snapshot will do very well for us.
> Another question, is below "DynamicImport-Package workaround" supposed to be bug? Or
it's just the way Camel needs to be configured on OSGi? If so it should be mentioned somewhere
in the docs... not everybody knows that DynamicImport-Package even exists.. (even some OSGi
> First of all, to even get this to "work" requires my own bundle to have this manifest:
> DynamicImport-Package: org.apache.camel.*
> Failing to do so will result in more classloading errors.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message