dev@glassfish.java.net

Re: why is grizzly registering JSR 77 MBeans?

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 21 Aug 2009 19:15:57 -0700

On 08/21/09 08:37, Lloyd Chambers wrote:
> I don't think we want com.sun.appserv MBeans. AMX already supplies
> JSR 77 MBeans.

It's the web container that registers them, not Grizzly.
These MBeans (inherited from Tomcat) have always been around.
They are registered during a web module's deployment, and unregistered
during undeployment. Each <network-listener> listens for the corresponding
registration and unregistration events, and updates its HTTP request
mapping table
accordingly.

Jan

>
>
> mx> find com.sun.appserv:
> com.sun.appserv:j2eeType=Servlet,name=FacesServlet,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=GreeterServlet,WebModule=//server/helloworld,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=Jersey Web
> Application,WebModule=//server/helloworld-webapp,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=ThemeServlet,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/hello1,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/helloworld,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=default,WebModule=//server/helloworld-webapp,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=index,WebModule=//server/hello1,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=jMaki XmlHttpProxy
> Servlet,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
> com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/hello1,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/helloworld,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=Servlet,name=jsp,WebModule=//server/helloworld-webapp,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=WebModule,name=//__asadmin/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=WebModule,name=//server/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=WebModule,name=//server/hello1,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=WebModule,name=//server/helloworld,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:j2eeType=WebModule,name=//server/helloworld-webapp,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:type=Connector,port=4848,address=0.0.0.0
> com.sun.appserv:type=Connector,port=8080,address=0.0.0.0
> com.sun.appserv:type=Engine
> com.sun.appserv:type=Host,host=__asadmin
> com.sun.appserv:type=Host,host=server
> com.sun.appserv:type=JspMonitor,name=index,WebModule=//server/hello1,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//__asadmin/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/hello1,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/helloworld,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/helloworld-webapp,J2EEApplication=null,J2EEServer=server
>
> com.sun.appserv:type=Loader,path=/,host=__asadmin
> com.sun.appserv:type=Loader,path=/,host=server
> com.sun.appserv:type=Loader,path=/hello1,host=server
> com.sun.appserv:type=Loader,path=/helloworld,host=server
> com.sun.appserv:type=Loader,path=/helloworld-webapp,host=server
> com.sun.appserv:type=Manager,path=/,host=__asadmin
> com.sun.appserv:type=Manager,path=/,host=server
> com.sun.appserv:type=Manager,path=/hello1,host=server
> com.sun.appserv:type=Manager,path=/helloworld,host=server
> com.sun.appserv:type=Manager,path=/helloworld-webapp,host=server
> com.sun.appserv:type=Mapper,port=4848,address=0.0.0.0
> com.sun.appserv:type=Mapper,port=8080,address=0.0.0.0
> com.sun.appserv:type=ProtocolHandler,port=4848,address=0.0.0.0
> com.sun.appserv:type=ProtocolHandler,port=8080,address=0.0.0.0
> com.sun.appserv:type=Realm,path=/,host=__asadmin
> com.sun.appserv:type=Realm,path=/hello1,host=server
> com.sun.appserv:type=Realm,path=/helloworld,host=server
> com.sun.appserv:type=Realm,path=/helloworld-webapp,host=server
> com.sun.appserv:type=Service,serviceName=null
> com.sun.appserv:type=Valve,name=BasicAuthenticator,path=/hello1,host=server
>
> com.sun.appserv:type=Valve,name=BasicAuthenticator,path=/helloworld,host=server
>
> com.sun.appserv:type=Valve,name=BasicAuthenticator,path=/helloworld-webapp,host=server
>
> com.sun.appserv:type=Valve,name=FormAuthenticator,path=/,host=__asadmin
> com.sun.appserv:type=Valve,name=GlassFishSingleSignOn,host=__asadmin
> com.sun.appserv:type=Valve,name=GlassFishSingleSignOn,host=server
> com.sun.appserv:type=Valve,name=StandardContextValve,path=/,host=__asadmin
>
> com.sun.appserv:type=Valve,name=StandardContextValve,path=/,host=server
> com.sun.appserv:type=Valve,name=StandardContextValve,path=/hello1,host=server
>
> com.sun.appserv:type=Valve,name=StandardContextValve,path=/helloworld,host=server
>
> com.sun.appserv:type=Valve,name=StandardContextValve,path=/helloworld-webapp,host=server
>
> com.sun.appserv:type=Valve,name=StandardEngineValve
> com.sun.appserv:type=Valve,name=StandardHostValve,host=__asadmin
> com.sun.appserv:type=Valve,name=StandardHostValve,host=server
>
>
>
>
> Aug 21, 2009 8:35:52 AM org.apache.catalina.connector.MapperListener
> handleNotification
> WARNING: Error registering Context
> com.sun.appserv:j2eeType=WebModule,name=//__asadmin/,J2EEApplication=null,J2EEServer=server
>
> java.lang.ArrayIndexOutOfBoundsException: -1
> at
> com.sun.grizzly.util.http.mapper.Mapper.addContext(Mapper.java:330)
> at
> org.apache.catalina.connector.MapperListener.registerContext(MapperListener.java:608)
>
> at
> org.apache.catalina.connector.MapperListener.handleNotification(MapperListener.java:371)
>
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1732)
>
> at
> javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
>
> at
> javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
>
> at
> javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
>
> at
> javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
>
> at
> javax.management.MBeanServerDelegate.sendNotification(MBeanServerDelegate.java:193)
>
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.sendNotification(DefaultMBeanServerInterceptor.java:1524)
>
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1501)
>
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
>
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
>
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
>
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
>
> at
> org.apache.tomcat.util.modeler.Registry.registerComponent(Registry.java:809)
>
> at
> org.apache.catalina.core.StandardContext.registerJMX(StandardContext.java:6291)
>
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5303)
> at com.sun.enterprise.web.WebModule.start(WebModule.java:509)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
>
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
> at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1812)
> at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1501)
> at
> com.sun.enterprise.web.WebApplication.start(WebApplication.java:93)
> at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
> at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:223)
> at
> org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:214)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:311)
>
> at
> com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:306)
>
> at
> com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:285)
>
> at
> com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:100)
>
> Aug 21, 2009 8:35:52 AM com.sun.enterprise.web.WebApplication start
> INFO: Loading application __admingui at /
> Aug 21, 2009 8:35:52 AM
> com.sun.enterprise.v3.server.ApplicationLoaderService processApplication
> INFO: Loading __admingui Application done is 3212 ms
> Aug 21, 2009 8:35:52 AM
> com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter setStateMsg
> INFO: The Admin Console application is loaded.
> Aug 21, 2009 8:35:56 AM org.glassfish.admingui.common.util.GuiUtil
> initSessionAttributes
> INFO: admin console: initSessionAttributes()
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>