incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmuer <reto.bachm...@trialox.org>
Subject Re: question about osgi reference
Date Fri, 05 Nov 2010 15:19:46 GMT
Hi Oli

On Mon, Nov 1, 2010 at 10:37 AM, Oliver Strässer <
oliver.straesser@getunik.com> wrote:

> Hi
>
> I wrote a ServiceClas, wich has no jax rs resources.
> My Head is defined in this way:
> @Component(metatype = true)
>
//metatype=true is only necessary if you need it to be configurable

> @Services({
>    @Service(value = AlchemyProvider.class)
> })
>
 @Service(AlchemyProvider.class)
would be enough

> public class AlchemyProvider
>
> I use some special Services via osgi:
> @Reference(target = PARSER_FILTER)
>    private ParsingProvider serializer;
>  @Reference
> private PlatformConfig platformConfig;
>
> and the LanguageService:
>
>    @Reference
>    private LanguageService languageService;
>
> Now my question:
> the first two references are working fine, without a problem.
> for the languageservice I need to define a bind and unbind method in the
> AlchemyProvider class, otherwise I receive an error:
>
> SCR Component Actor] ERROR net.getunik.clerezza.app.clips.core -
> [net.getunik.clerezza.app.clips.core.ClipsProvider] Cannot create component
> instance due to failure to bind reference alchemyProvider
> SCR Component Actor] ERROR com.orchestr8.api -
> [com.orchestr8.api.AlchemyProvider] bind method [bindLanguageService] not
> found
>
> In other classes I didn't need the bind methods for the Languageservice.
> could  anybody explain this behaviour to me?
>
The bindMethods are created by the maven-scr-plugin, you may verify with
javap what went wrong with the gerenation of this bind-method. But to me iit
looks like a bug of the felix maven-scr-plugin.

Cheers,
reto


>
> cheers
> oli
>
>
> --getunik ag-------------------------------------------
>  oliver straesser              oliver.straesser@getunik.com<mailto:
> oliver.straesser@getunik.com>
>  hardturmstrasse 101    fon: +41 (0)44 388 55 88
>  ch-8005 zuerich              fax: +41 (0)44 388 55 89
>
>   --aktuelles getunik projekt-------------------------
>   Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne:
> www.geomarketing.com<http://www.geomarketing.com/>
>
>  --best of swiss web awards 2009------------------
>   Gold & Silber für Connect2Earth / Bronze für WWF UK
>
> we make the web a better place - www.getunik.com<http://www.getunik.com/>
>
>
>
>
> *****************************************************************
> P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es
> Ihnen.
> *****************************************************************
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message