Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-5654

The web console plugin init(config) method is invoked for every request to the console

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: webconsole-4.3.4
    • Fix Version/s: None
    • Component/s: Web Console
    • Labels:
      None

      Description

      I have published a web console plugin (extending AbstractWebConsolePlugin). Before Sling 9, the init(config) method (from the Servlet API) used to be called, as it should, exactly once when the servlet was made available.

      Since sling 9, the init method on this singleton gets invoked every time the web console (not just this plugin) is requested.

      Here is a stack trace of the init invocation:

      ...init(...)  
      at org.apache.felix.webconsole.internal.servlet.PluginHolder$Plugin.init(PluginHolder.java:497)
      at org.apache.felix.webconsole.internal.servlet.PluginHolder$Plugin.getConsolePlugin(PluginHolder.java:600)
      at org.apache.felix.webconsole.internal.servlet.PluginHolder$Plugin.doGetCategory(PluginHolder.java:586)
      at org.apache.felix.webconsole.internal.servlet.PluginHolder$ServletPlugin.doGetCategory(PluginHolder.java:714)
      at org.apache.felix.webconsole.internal.servlet.PluginHolder$Plugin.getCategory(PluginHolder.java:581)
      at org.apache.felix.webconsole.internal.servlet.PluginHolder.getLocalizedLabelMap(PluginHolder.java:255)
      at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:539)
      at org.apache.felix.webconsole.internal.servlet.OsgiManager$3.run(OsgiManager.java:465)
      at java.security.AccessController.doPrivileged(AccessController.java:-1)
      at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:461)
      at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
      at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
      at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)
      at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
      at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
      at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)
      at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
      at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
      at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)
      at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
      at org.eclipse.jetty.server.Server.handle(Server.java:534)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
      at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
      at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              o.otto Olaf Otto
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: