Carsten Ziegeler wrote:
Felix Meschberger schrieb:
Ah ! Had the same issue when building the "everything is a resource"
prototype: I solved this by having the activate method initialize all
pending servlets. This works as the ServletContext is a static mandatory
reference and those are bound BEFORE the component gets activated.

That is, as soon as the ComponentContext field is set by the activate
method, the servlet binder method can safely assume that the
ServletContext field is also set and initialize new servlets.

On the other hand, the Servlet unbinder always destroy the undbound
servlet. In addition, the deactivate method unbinds all servlets still
bound when the component is actually deactivated.

See
http://svn.apache.org/repos/asf/incubator/sling/whiteboard/fmeschbe/resource/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/SlingServletResolver.java

Ok, yes, I'll have a look at this and clean up the impl in trunk.

Thanks for the pointer!

Ok, I've applied your version to trunk - it's much simpler :)

Carsten
--
Carsten Ziegeler
[EMAIL PROTECTED]

Reply via email to