>>>>> Steinar Bang <[email protected]>:

>> [snip!]
>>> objectClass = [javax.servlet.ServletContext]
>>> osgi.web.contextname = authservice
>>> osgi.web.contextpath = /authservice
>>> osgi.web.symbolicname = no.priv.bang.authservice.web.security

>>> Hm... so why don't I get service injections when trying to filter on the 
>>> properties

>> Because I tried the following:
>> osgi.web.symbolicname=authservice
>> osgi.web.contextpath=/authservice

>> It's pretty obvious why osgi.web.symbolicname didn't work. :-)

>> But osgi.web.contextpath should have worked.  Why didn't it work?  Did I
>> fool myself while testing?  I think I will try that one again.

> Didn't help.
>  @Reference(target = "(osgi.web.webcontext=/authservice)")
> doesn't match.

> A breakpoint in the setter is never triggered and the bundle is never
> activated (since the reference isn't satisfied).

I started thinking maybe it was the leading / on the match value that
was the problem? Maybe the / has special significance for the LDAP
syntax? Maybe the match has to start with an alphanumeric character...?
Or something...?

So I tried
    @Reference(target = "(osgi.web.contextname=authservice)")
and that worked just fine: the setter was called and the @Activate
method was called and the bundle became active.

The problem with using this was that osgi.web.contextname wasn't in the
list of properties mentioned in what I assume will be the next
generation of the web web whiteboard.

So what to do?

Presumably
    @Reference(target = 
"(osgi.web.symbolicname=no.priv.bang.authservice.web.security)")
will also work, but I don't like it (it's long, cluttered and sort of
misleading)

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/86ftdyu566.fsf%40dod.no.

Reply via email to