The ServiceLoader approach is not incompatible with OSGi as long as you
don't have boxed in code that does its own ServiceLoader without providing
alternative ways to inject implementations (e.g. as discovered through OSGi
services).

For an example of a broken one, see FileSystemProvider in Java 8. :-)

My +1 to just insert as Benedikt suggest, and not make the registry. I
think this is mainly of use for in-between libraries that don't want to
have to choose, and don't want injecting of factory from the outside. As
our objects are inter+compatible it may not be of great importance which
impl they get, as long as they get one.
On 30 Apr 2015 10:05, "Sergio Fernández (JIRA)" <[email protected]> wrote:

>
>     [
> https://issues.apache.org/jira/browse/COMMONSRDF-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14521174#comment-14521174
> ]
>
> Sergio Fernández commented on COMMONSRDF-20:
> --------------------------------------------
>
> I was not trying to target OSGi specifics, but at least not being
> incompatible with OSGi.
>
> > Provide a mechanism of loading different RDF Term Factories
> > ------------------------------------------------------------
> >
> >                 Key: COMMONSRDF-20
> >                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-20
> >             Project: Apache Commons RDF
> >          Issue Type: New Feature
> >    Affects Versions: 0.1
> >            Reporter: Sergio Fernández
> >             Fix For: 0.2
> >
> >
> > Benedikt has asked this questions in the mailing list:
> > http://markmail.org/message/az4jb744zfct2uq5
> > What [we currently have|
> http://commonsrdf.incubator.apache.org/userguide.html#Creating_Commons_RDF_instances]
> remains valid, but would be great to make easier the life of people.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>

Reply via email to