Issue Details (XML | Word | Printable)

Key: GLASSFISH-14405
Type: Bug Bug
Status: In Progress In Progress
Priority: Critical Critical
Assignee: Peter Bower
Reporter: Nazrul
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

Use consistent mbean object name

Created: 03/Nov/10 06:23 PM   Updated: 13/Mar/13 02:01 PM
Component/s: amx
Affects Version/s: 4.0
Fix Version/s: future release

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All

Issue Links:
Dependency
 

Issuezilla Id: 14,405
Tags: 3_1-exclude
Participants: Amy Roh, Nazrul, Peter Bower and prasads


 Description  « Hide

[Tracking Issue]

Refer to issue 14357 for context.

We seem to be using both "amx:" and "com.sun.appserv:". We should be using one
name consistently for all GlassFish object names.

Given that we are de-emphasiging AMX, should we use "com.sun.appserv:" (for JSR
77, monitoring mbeans, etc.)?

Since email thread did not work, I am creating this issue to finalize a decision
on this.



Nazrul added a comment - 09/Nov/10 11:19 AM

If we are able to change, using something like "glassfish:" is probably a good
choice.


Amy Roh added a comment - 16/Nov/10 10:32 AM

Fixed in web container.

Sending
core/kernel/src/main/java/com/sun/enterprise/v3/server/ServerContextImpl.java
Transmitting file data .
Committed revision 42857.


Nazrul added a comment - 01/Dec/10 12:02 PM

See also issue GLASSFISH-14923


Nazrul added a comment - 06/Dec/10 10:44 AM

The tomcat created mbeans were conflicting during load time of AMX mbeans. Since this is late in 3.1, we decided to leave the tomcat created mbeans under "glassfish-web:". We will also try to comment out (not create) mbeans that are not needed by web container initialization. During 3.2, we will try to not rely on mbeans for configuration update notification in web container.

Prasad will try to rename "amx:" to "glassfish:" if there are no issues.


Amy Roh added a comment - 06/Dec/10 02:59 PM

Changed web domain to "glassfish-web" in svn 43495 and removed unused Tomcat MBeans registration in svn 43514


prasads added a comment - 06/Dec/10 08:56 PM

This would be fixed in 3.2


prasads added a comment - 09/Dec/10 02:16 AM

There are a couple of issues that we need to look at :
1. There is a conflict due to two Mbeans being created for a WebModule/Servlet/Wrapper. This is confusing.
2. Since there are two MBeans being created both of them are being registered as NotificationHandlers for mbean notifications.
3. These Mbeans are loaded at different times . The ones created by Tomcat are loaded at startup and the ones created by AMX are loaded on demand.

The outcome of #1 is that its confusing to see two MBeans of same type being created for a single WebModule, Servlet under the same domain. While one represents the JSR77 Mbean created by GlassFish, the other one represents the MBean created by Tomcat for its internal lifecycle management. The user would need to use the former, but there is no way for him/her to know which one to use.

The outcome of #2 is that the wrong mBean handles the notification coming from the mBean Server . This results in an ugly message.
[#|2010-11-23T13:42:34.233+0530|WARNING|glassfish3.1|org.apache.catalina.connector.MapperListener|_ThreadID=15;_ThreadName=Thread-1;|Error registering Wrapper glassfish:pp=/J2EEDomain/J2EEServer/WebModule[jsfastrologer],type=Servlet,name=default,j2eeType=Servlet,J2EEServer=server,WebModule=jsfastrologer,J2EEApplication=null
javax.management.MBeanException
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.handleException(AMXImplBase.java:830)
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.handleInvokeThrowable(AMXImplBase.java:846)
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.invoke(AMXImplBase.java:878)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795)
at com.sun.enterprise.v3.admin.DynamicInterceptor.invoke(DynamicInterceptor.java:353)
at org.apache.catalina.connector.MapperListener.registerWrapper(MapperListener.java:667)
at org.apache.catalina.connector.MapperListener.handleNotification(MapperListener.java:369)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1776)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:274)
at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:339)
at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:324)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:247)
at javax.management.MBeanServerDelegate.sendNotification(MBeanServerDelegate.java:205)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.sendNotification(DefaultMBeanServerInterceptor.java:1563)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1538)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:986)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516)
at com.sun.enterprise.v3.admin.DynamicInterceptor.registerMBean(DynamicInterceptor.java:438)
at org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.registerJ2EEChild(RegistrationSupport.java:555)
at org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.registerWebModuleAndItsComponents(RegistrationSupport.java:408)
at org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.createAppMBeans(RegistrationSupport.java:267)
at org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.processApplicationRef(RegistrationSupport.java:527)
at org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.registerApplications(RegistrationSupport.java:479)
at org.glassfish.admin.amx.impl.j2ee.RegistrationSupport.<init>(RegistrationSupport.java:163)
at org.glassfish.admin.amx.impl.j2ee.J2EEServerImpl.registerChildren(J2EEServerImpl.java:121)
at org.glassfish.admin.amx.impl.j2ee.DASJ2EEServerImpl.registerChildren(DASJ2EEServerImpl.java:73)
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.postRegisterHook(AMXImplBase.java:972)
at org.glassfish.admin.amx.impl.mbean.MBeanImplBase.postRegister(MBeanImplBase.java:352)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.postRegisterInvoke(DefaultMBeanServerInterceptor.java:1058)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:997)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516)
at com.sun.enterprise.v3.admin.DynamicInterceptor.registerMBean(DynamicInterceptor.java:438)
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.registerChild(AMXImplBase.java:1025)
at org.glassfish.admin.amx.impl.j2ee.J2EEDomainImpl.registerChildren(J2EEDomainImpl.java:104)
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.postRegisterHook(AMXImplBase.java:972)
at org.glassfish.admin.amx.impl.mbean.MBeanImplBase.postRegister(MBeanImplBase.java:352)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.postRegisterInvoke(DefaultMBeanServerInterceptor.java:1058)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:997)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516)
at com.sun.enterprise.v3.admin.DynamicInterceptor.registerMBean(DynamicInterceptor.java:438)
at org.glassfish.admin.amx.impl.j2ee.loader.AMXJ2EEStartupService.loadAMXMBeans(AMXJ2EEStartupService.java:253)
at org.glassfish.admin.amx.impl.AMXStartupService$AMXLoaderThread.run(AMXStartupService.java:305)
Caused by: java.lang.NoSuchMethodException: no operation findMappingObjectnull in glassfish:pp=/J2EEDomain/J2EEServer/WebModule[jsfastrologer],type=Servlet,name=default,j2eeType=Servlet,J2EEServer=server,WebModule=jsfastrologer,J2EEApplication=null
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.invokeManually(AMXImplBase.java:897)
at org.glassfish.admin.amx.impl.mbean.AMXImplBase.invoke(AMXImplBase.java:874)

The #3 ,makes it hard for us to plugin the Tomcat created MBeans into the AMX subsystem instead of creating a new Mbean .

All these 3 issues have to be considered and an optimal solution found. The time required for this effort makes it impossible to fix in v3.1


prasads added a comment - 20/Feb/11 08:03 AM

Assigning issues to Naman


Peter Bower added a comment - 13/Mar/13 02:01 PM

Object names are part of the public API. Therefore, we can't remove them at this time.