Expose additional attributes on the current web container GBean implementation
------------------------------------------------------------------------------
Key: GERONIMO-466
URL: http://nagoya.apache.org/jira/browse/GERONIMO-466
Project: Apache Geronimo
Type: Wish
Components: web
Reporter: Lester T. Ecarma
Priority: Minor
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);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira