Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-466

Expose additional attributes on the current web container GBean implementation

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • web
    • None

    Description

      Wouldn't it be neat if we can get to the other properties of the web server instance running in geronimo, such as the connectors/listeners and application contexts? Right now, it only exposes the statistics from the underlying HttpServer, but there's no way to get to information pertaining to the deployed connectors and contexts.

      Index: JettyContainerImpl.java
      ===================================================================
      — JettyContainerImpl.java (revision 57128)
      +++ JettyContainerImpl.java (working copy)
      @@ -34,6 +34,14 @@
      public class JettyContainerImpl implements JettyContainer, GBeanLifecycle {
      private final Server server;

      + public HttpContext[] getContexts()

      { + return server.getContexts(); + }

      +
      + public HttpListener[] getListeners()

      { + return server.getListeners(); + }

      +
      public void resetStatistics()

      { server.statsReset(); }

      @@ -177,6 +185,8 @@
      infoFactory.addAttribute("requestsActiveMax", Integer.TYPE, false);
      infoFactory.addAttribute("requestsDurationAve", Long.TYPE, false);
      infoFactory.addAttribute("requestsDurationMax", Long.TYPE, false);
      + infoFactory.addAttribute("contexts", HttpContext[].class, false);
      + infoFactory.addAttribute("listeners", HttpListener[].class, false);
      infoFactory.addOperation("resetStatistics");

      infoFactory.addAttribute("requestLog", RequestLog.class, false);

      Attachments

        1. JettyContainerImpl.java.patch
          1 kB
          Lester T. Ecarma

        Activity

          People

            Unassigned Unassigned
            lecarma Lester T. Ecarma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: