users@glassfish.java.net

Re: Using declared Services in Glassfish v3 prelude

From: <glassfish_at_javadesktop.org>
Date: Tue, 21 Apr 2009 11:50:17 PDT

>
> On Apr 20, 2009, at 1:59 PM,
> glassfish_at_javadesktop.org wrote:
>
> > Hi Jerome,
> >
> > deploying osgi bundles is no problem. I got
> problems while deploying
> > osgi bundles with declared services
> (http://felix.apache.org/site/apache-felix-service-com
> ponent-runtime.html
> > ). Important there is that i define an
> Service-Component entry in
> > Manifest.MF which reference an xml file. This xml
> file contains my
> > service declaration (like hk2 @Service annotation
> but an xml file).
> >
> > By the way i deploy my bundles by hand, just
> copying them into the
> > modules folder.
> >
> if you do that, the bundles are not started
> automatically which may
> explain why your services are not started.

i now use the asadmin deploy command via maven exec. This approach is very nice but doesn't solve my problem. The Service is not visible nor initiated.

I currently user bundlecontext.getServiceReference(String serviceInterface);

should i use an different approach?

> not sure what felix supports here in terms of
> referencing from the
> manifest file, maybe richard can clarify.

This approach is explained at the following site:

http://felix.apache.org/site/apache-felix-service-component-runtime.html

I guess that is the default way for declarative services.
>
> try to do the deploy route first, and see if that
> changes your
> services registration.
>
> > Best Regards,
> >
> > Andreas
> > [Message sent by forum member 'aluedeke'
> (aluedeke)]
> >
> >
> http://forums.java.net/jive/thread.jspa?messageID=3429
> 31
> >
> >
> ------------------------------------------------------
> ---------------
> > To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
> >
>
>
> ------------------------------------------------------
> ---------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
[Message sent by forum member 'aluedeke' (aluedeke)]

http://forums.java.net/jive/thread.jspa?messageID=343123