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

Guillaume Nodet commented on FELIX-2409:
----------------------------------------

It's not for karaf internal needs.  Let me try to explain.

Let say you want to use JAX-WS, javax.scripting, SAAJ, or any specification 
that usually leverage META-INF/services discovery mechanism.   Some of those 
specs are provided by JDK 1.6 and maybe some new specs will be provided by JDK 
1.7 in the future.
If you come from a Java SE environment, you're used to using those API.  If you 
want to drop a new provider, you just add it to your classpath and it will be 
used.

Now in an OSGI environment, things don't really work that way.  The worst thing 
is that if we offer those APIs from the JRE, the user has *no way* to change 
the provider.  So that 's the main problem i'd like to avoid.  It's about 
making things work in OSGi ...  That's why Karaf try to avoid exporing any 
package that can be provided by other means (such as javax.xml.ws, 
javax.scripting, javax.jws, javax.activation).

All those can be provided by additional bundles.

In addition, a common problem with those packages is that they aren't 
versioned, which can also cause problems if you have a bundle requiring a 
version > 0.0.

Now, as I said, I think it's fair to tweak the configuration for you own 
environment.

Last, when JDK 1.7 comes out, we'll have to check it and write a new config for 
it I suppose.

> javax.annotation not exported
> -----------------------------
>
>                 Key: FELIX-2409
>                 URL: https://issues.apache.org/jira/browse/FELIX-2409
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf 1.6.0
>         Environment: Windows / jre-1.6
>            Reporter: Jean-Philippe CLEMENT
>
> Karaf config.properties does not export "jre-1.6" javax.annotation and 
> javax.annotation.processing standard packages.
> As they are part of the java 1.6 API it sounds normal to have them imported 
> by default:
>  javax.annotation, \
>  javax.annotation.processing, \
> Would it be possible to fix this?
> Thanks.

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

Reply via email to