users@glassfish.java.net

OSGi-enabled Jersey application possible?

From: <glassfish_at_javadesktop.org>
Date: Tue, 14 Jul 2009 14:39:18 PDT

Hi there,

I found several blog-entries that show how OSGi services are injected into a Servlet via @Resource. I tried to do the same within a Jersey application, but my service does not get injected.

My bundle is active and I entered the service name as listed in the osgi-console into the annotation:

@Resource(mappedName="scoringmodule.HelloService")
        HelloService helloService;

helloService remains null. But I'm actually not even sure, whether this is supposed to work anyway.

Any hints or comments on this?

Thanks,
Ralph
[Message sent by forum member 'rhwinzin' (rhwinzin)]

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