Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-04-02 Thread Steinar Bang
Injection of ServletContext worked (as can be seen earlier in this thread). But it turns out it wasn't needed because the Shiro AbstractFilter class[1] extends ServletContextSupport[2], and saves the ServletContext when receiving the FilterConfig[3]. So shiro filters already have the

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-24 Thread Grzegorz Grzybek
Hello 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. > I just checked what pax web is doing and it's:

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
> Steinar Bang : >> [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

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
> Steinar Bang : > [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

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
> Steinar Bang : [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 >

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
> Grzegorz Grzybek : > As you can see, the properties you're looking for are there. Please > check `bundle-services -p` command (or Karaf 4 equivalent) to check > what can you filter by. Thanks, Grzegorz! Yep, the properties are present: karaf@root()> bundle:services -p 63 Authentication

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Jean-Baptiste Onofré
Hi AFAIR, those properties are already supported in Pax Web. Regards JB On Mon, Mar 23, 2020 at 12:25 AM Steinar Bang wrote: > > Grzegorz Grzybek >: > > >> Will it be possible to get a ServletContext OSGi service injected into a > >> @Reference, when using the web whiteboard of OSGi 7? >

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-22 Thread Steinar Bang
> Grzegorz Grzybek : >> Will it be possible to get a ServletContext OSGi service injected into a >> @Reference, when using the web whiteboard of OSGi 7? >> > Sure - it's described in 128.3.4 Publishing the Servlet Context chapter of > CMPN specification and I think it should already be a

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-02-11 Thread Grzegorz Grzybek
Hello I'm just in the process of reviewing Pax Web 8.0.0-SNAPSHOT for upcoming Karaf 4.3.0 release. There's lot to review, because some important Whiteboard implementation aspects are not handled correctly in Pax Web (mapping a servlet to multiple ServletContexts for example). Will it be

Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-02-11 Thread Steinar Bang
I'm currently using shiro 1.5.0 with web whiteboard in karaf 4.2.8. I'm using some deprecated Shiro classes to set up shiro, and I want to get rid of using the deprecated classes. The first snag I've encountered when replacing the deprecated classes is that the IniWebEnvironment class needs a