felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Kriens (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5091) Allow to exclude system packages without redefining all exports
Date Wed, 28 Oct 2015 08:58:27 GMT

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

Peter Kriens commented on FELIX-5091:
-------------------------------------

The format of the org.osgi.framework.system.packages.extra is standardized by the OSGi so
you are creating proprietary extensions.

In this particular case it is a bad idea anyway since you can run into problems with the uses
constraints. I think sql packages referent to jta. Since the sql packages come from the JVM,
you create a nice mess.

The only proper solution Ive found is to put the correct JTA package on the same class path
as where framework resides. This will then fill in the missing package from the JVM.

In bndtools this is easily done by placing the jar on the -runpath

   -runpath: javax.transaction;version=1.1

If it has an exports they will be automatically added to the system packages.

> Allow to exclude system packages without redefining all exports
> ---------------------------------------------------------------
>
>                 Key: FELIX-5091
>                 URL: https://issues.apache.org/jira/browse/FELIX-5091
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-5.4.0
>            Reporter: Christian Schneider
>             Fix For: framework-5.6.0
>
>
> There are several cases where the OSGi framework exports system packages by default but
the result is not usable.
> For example javax.transaction is exported but the package is not complete. So a regular
case is to exclude this package and provide it as a bundle.
> Currently this can be done by redefining org.osgi.framework.system.packages. The problem
is that you then need to redefine all the system packages which is a big list and additionally
differs between java versions.
> So I propose to allow to exclude single packages without having to redefine them all.

> One simple solution would be to use org.osgi.framework.system.packages.extra and allow
to specify a package to exclude by prefixing it with "-".
> E.g.
> org.osgi.framework.system.packages.extra=-javax.transaction,-javax.transaction.xa
> This would avoid creating another framework property.
> Alternatively we could introduce a new property like:
> org.osgi.framework.system.packages.exclude=javax.transaction,javax.transaction.xa
> This property would then only allow to exclude exports.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message