I'm going to assume you are talking about:

HttpService[1] or Http Whiteboard[2] w.r.t. the reference to Servlet
AND
JAX-RS Whiteboard[3] w.r.t. the reference to ContainerRequestFilter

These 2(3) features are separate concerns and the ContainerRequestFilter of
the JAX-RS whiteboard spec doesn't apply to the Servlets of the Http
Whiteboard. You probably just want a regular old servlet Filter[4]

Now it's possible that you are talking about some other runtime that packs
all these things together. If so, you probably want to ask the implementors
about this.

Hope that helps clear things up,
- Ray

[1] https://osgi.org/specification/osgi.cmpn/7.0.0/service.http.html
[2]
https://osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html
[3] https://osgi.org/specification/osgi.cmpn/7.0.0/service.jaxrs.html
[4]
https://osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#d0e121055

On Tue, Jan 29, 2019 at 9:59 AM Nhut Thai Le via osgi-dev <
[email protected]> wrote:

> Hello,
>
> I have a component implementing ContainerRequestFilter to intercept REST
> calls and another component implements servlet.Filter. Both have PROTOTYPE
> scope, my understanding is that these filter are instantiated and activated
> for each web request but yesterday when i put some breakpoints in
> the @activate method, i did not see them get called when a web request
> arrives. Did I miss something? If they are not init/activate per request
> why are they recomeded to be prototype?
>
> Thai Le
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to