[ 
https://issues.apache.org/jira/browse/STANBOL-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478757#comment-13478757
 ] 

Rupert Westenthaler commented on STANBOL-774:
---------------------------------------------

The best Practice for Versioning [2] includes

> If you provide an API (as defined in te Semantic Versioning 
> whitepaper) export the API package even if it is not in your 
> project and put the provide:=true directive on the package 

I have not followed this suggestion for now, mainly because it looked strange 
to me if 10+ EnhancementEngines do export the o.a.s.enhancer.servicesapi 
package.

Maybe we should change that. Any opinnion?

                
> Check Exported, Imported and Private Packages; use version ranges for Imports
> -----------------------------------------------------------------------------
>
>                 Key: STANBOL-774
>                 URL: https://issues.apache.org/jira/browse/STANBOL-774
>             Project: Stanbol
>          Issue Type: Sub-task
>            Reporter: Rupert Westenthaler
>
> Host Applications that do run Stanbol in an embedded OSGI environment need to 
> export all packages of used Interfaces (and all Classes used in those 
> Interfaces). This is required to ensure that the java Classes used by Stanbol 
> (running within the embedded OSGI environment) are the same as the one 
> available to the Host application (see [1] for details).
> To use Apache Stanbol in such a scenario one must be more careful with OSGI 
> metadata in the Stanbol bundle manifests.
> This Issue covers mainly two improvements:
> 1. Ensure that all exported (and internally used) packages are also imported. 
> Otherwise internal usage of non-imported packages would case 
> incompatibilities with the host application as it could not cast instances 
> created by using the internal Classes to the Classes loaded by the Host 
> applications Classloader (see [2] for details).
> 2. Ensure that Stanbol bundles use proper version ranges for imported 
> packages. The Host Application is limited to a single version of a Class. So 
> if different Stanbol Bundles do require different versions of a module those 
> can not be correctly exposed form the Host Application via the System Bundle 
> - what would make it impossible for a Host Application to use the affected 
> Stanbol Modules together. To avoid it is important do not import fixed 
> version but rather to use proper version ranges for imported packages.
> [1] 
> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-hostserviceusage
> [2] 
> http://felix.apache.org/site/apache-felix-osgi-faq.html#ApacheFelixOSGiFAQ-Shouldabundleimportitsownexportedpackages?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to