You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by Anatole Tresch <at...@gmail.com> on 2015/11/06 22:24:42 UTC

OSGI and util.ServiceLoader

Hi all

I currently try to setup Arquilian with Felix embedded to test the OSGI
integration of Tamaya. I took some time, but so far  (not yet checked in) I
have a running version despite one issue:

It looks that loading of services using java.util.ServiceLoader does not
work anymore. Now before I dive even deeper into OSGI (I am aware of the
"OSGI way" of loading/acceessing "services") I would like to ask you guys
here on the list, if somebody can give me a hint:

1) Is there a way to get OSGI to work with the ServiceLoader logic, without
having to change code, e.g. by configuring the felix plugin accordingly? If
so, how?

2) Do you have other useful tipps how to get things working in both OSGI
and non OSGI worlds without having to add code deps in the Java code?

Thanks and have a nice evening
Anatole

-- 
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon

*Switzerland, Europe Zurich, GMT+1*
*Twitter:  @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*

*Google: atsticksMobile  +41-76 344 62 79*

Re: OSGI and util.ServiceLoader

Posted by Anatole Tresch <at...@gmail.com>.
Thanks Romain.

At least I know now there is no silver bullet ;) -》back to work...!
Am 06.11.2015 11:31 PM schrieb "Romain Manni-Bucau" <rm...@gmail.com>:

> Hi Anatole,
>
> 2015-11-06 13:24 GMT-08:00 Anatole Tresch <at...@gmail.com>:
>
> > Hi all
> >
> > I currently try to setup Arquilian with Felix embedded to test the OSGI
> > integration of Tamaya. I took some time, but so far  (not yet checked
> in) I
> > have a running version despite one issue:
> >
> > It looks that loading of services using java.util.ServiceLoader does not
> > work anymore. Now before I dive even deeper into OSGI (I am aware of the
> > "OSGI way" of loading/acceessing "services") I would like to ask you guys
> > here on the list, if somebody can give me a hint:
> >
> > 1) Is there a way to get OSGI to work with the ServiceLoader logic,
> without
> > having to change code, e.g. by configuring the felix plugin accordingly?
> If
> > so, how?
> >
> >
> No clean and really portable one.
>
>
> > 2) Do you have other useful tipps how to get things working in both OSGI
> > and non OSGI worlds without having to add code deps in the Java code?
> >
> >
> A spi for service loading. This is what apache projects do most of the
> time. Alternative is registration method OSGi and SE can use + a module
> doing the registration with an Activator.
>
>
> > Thanks and have a nice evening
> > Anatole
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter:  @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile  +41-76 344 62 79*
> >
>

Re: OSGI and util.ServiceLoader

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Anatole,

2015-11-06 13:24 GMT-08:00 Anatole Tresch <at...@gmail.com>:

> Hi all
>
> I currently try to setup Arquilian with Felix embedded to test the OSGI
> integration of Tamaya. I took some time, but so far  (not yet checked in) I
> have a running version despite one issue:
>
> It looks that loading of services using java.util.ServiceLoader does not
> work anymore. Now before I dive even deeper into OSGI (I am aware of the
> "OSGI way" of loading/acceessing "services") I would like to ask you guys
> here on the list, if somebody can give me a hint:
>
> 1) Is there a way to get OSGI to work with the ServiceLoader logic, without
> having to change code, e.g. by configuring the felix plugin accordingly? If
> so, how?
>
>
No clean and really portable one.


> 2) Do you have other useful tipps how to get things working in both OSGI
> and non OSGI worlds without having to add code deps in the Java code?
>
>
A spi for service loading. This is what apache projects do most of the
time. Alternative is registration method OSGi and SE can use + a module
doing the registration with an Activator.


> Thanks and have a nice evening
> Anatole
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter:  @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile  +41-76 344 62 79*
>