dev@glassfish.java.net

non-compliant AMX MBeans

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Mon, 29 Jun 2009 13:01:32 -0700

Someone has been creating AMX MBeans in Glassfish V3 using Gmbal (good).

Except that the MBeans are in violation of the AMX spec: the Parent
attribute is being returned as null. This will cause all sorts of
downstream problems, namely breaking any client proxy code involving
any non-complaint MBeans. It is also causing a mess in the server log
and interfering with my progress elsewhere in AMX.

In particular, the following MBeans fail when asked for the critical
'Parent' attribute, returning 'null':

v3:type=JVMClassLoadingStatsProvider,name=jvm/class-loading-system,pp=/
mon/server-mon[das]
v3:type=JVMRuntimeStatsProvider,name=jvm/runtime,pp=/mon/server-mon[das]
v3:type=JVMMemoryStatsProvider,name=jvm/memory,pp=/mon/server-mon[das]
v3:type=JVMGCStatsProvider,name=jvm/garbage-collectors,pp=/mon/server-
mon[das]
v3:type=JVMCompilationStatsProvider,name=jvm/compilation-system,pp=/
mon/server-mon[das]
v3:type=JVMOSStatsProvider,name=jvm/operating-system,pp=/mon/server-
mon[das]
v3:pp=/mon/server-mon[das],type=HttpServiceStatsProvider,name=http-
service/__asadmin

Will whoever is responsible for these MBeans please contact me to
resolve this--thanks.

Lloyd


Begin forwarded message:

From: Lloyd Chambers <lloyd.chambers_at_sun.com>
Date: June 29, 2009 11:46:14 AM PDT
To: dev_at_gmbal.kenai.com
Subject: Gmbal broken

At least in my build (today 6/29), Gmbal is failing, causing me
difficulty in testing AMX.

Gmbal fails to return the "Parent" attribute, which fails any proxy-
based code attempting to create a dynamic proxy. This is particularly
bad for situations in which the errant MBeans are part of a larger
group, since it fails them as a group.

All of the new type=JVM* MBeans are failing.

Is there still a Gmbal version issue?


jmxcmd> get * pp=/mon/server-mon[das]
---v3:pp=/mon/server-
mon[das],type=JVMClassLoadingStatsProvider,name=jvm/class-loading-
system---
Children={}
Name=jvm/class-loading-system
loadedclass-count=4200
totalloadedclass-count=4200
unloadedclass-count=0
Failed Attributes: Parent

---v3:pp=/mon/server-mon[das],type=JVMRuntimeStatsProvider,name=jvm/
runtime---
Children={}
Name=jvm/runtime
bootclasspath-current=/System/Library/Frameworks/JavaVM.framework/
Versions/1.6.0/Classes/jsfd.jar:/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/System/Library/
Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/
Resources/Java/JavaRuntimeSupport.jar:/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/System/Library/
Frameworks/JavaVM.framework/Versions/1.6.0/Classes/laf.jar:/System/
Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/
sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/
1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/
Versions/1.6.0/Classes/jce.jar:/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Classes/charsets.jar
classpath-current=/work/v3/glassfishv3/glassfish/modules/glassfish.jar
inputarguments-current={-XX:+UnlockDiagnosticVMOptions,-
XX:MaxPermSize=192m,-XX:NewRatio=2,-XX:+LogVMOutput,-XX:LogFile=/work/
v3/glassfishv3/glassfish/domains/domain1/logs/jvm.log,-Xmx512m,-
Djdbc.drivers=org.apache.derby.jdbc.ClientDriver,-
Djavax.net.ssl.trustStore=/work/v3/glassfishv3/glassfish/domains/
domain1/config/cacerts.jks,-Djavax.net.ssl.keyStore=/work/v3/
glassfishv3/glassfish/domains/domain1/config/keystore.jks,-
Djava.security.policy=/work/v3/glassfishv3/glassfish/domains/domain1/
config/server.policy,-Dcom.sun.aas.instanceRoot=/work/v3/glassfishv3/
glassfish/domains/domain1,-
Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory,-DANTLR_USE_DIRECT_CLASS_LOADING=true,-Djava.security.auth.login.config=/work/v3/glassfishv3/glassfish/domains/domain1/config/login.conf,-Djava.endorsed.dirs=/work/v3/glassfishv3/glassfish/lib/endorsed,-Dcom.sun.aas.installRoot=/work/v3/glassfishv3/glassfish,-Djava.ext.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/jre/lib/ext:/work/v3/glassfishv3/glassfish/domains/domain1/lib/ext:/work/v3/glassfishv3/javadb/lib}
librarypath-current=.:/Library/Java/Extensions:/System/Library/Java/
Extensions:/usr/lib/java
managementspecversion-current=1.2
name-current=30011_at_llcMP.local
specname-current=Java Virtual Machine Specification
specvendor-current=Sun Microsystems Inc.
specversion-current=1.0
uptime-count=48834
vmname-current=Java Virtual Machine Specification
vmvendor-current=Sun Microsystems Inc.
vmversion-current=1.0
Failed Attributes: Parent

---v3:pp=/mon/server-mon[das],type=JVMGCStatsProvider,name=jvm/garbage-
collectors---
Children={}
Name=jvm/garbage-collectors
Failed Attributes: collectioncount-count,Parent,collectiontime-count

---v3:pp=/mon/server-mon[das],type=JVMMemoryStatsProvider,name=jvm/
memory---
Children={}
Name=jvm/memory
committedheapsize-count=38813696
committednonheapsize-count=25473024
initheapsize-count=0
initnonheapsize-count=24317952
maxheapsize-count=514523136
maxnonheapsize-count=251658240
objectpendingfinalizationcount-count=0
usedheapsize-count=25481904
usednonheapsize-count=24163840
Failed Attributes: Parent

---v3:pp=/mon/server-
mon[das],type=JVMCompilationStatsProvider,name=jvm/compilation-system---
Children={}
Name=jvm/compilation-system
name-current=HotSpot 64-Bit Server Compiler
totalcompilationtime-current=6082
Failed Attributes: Parent

---v3:pp=/mon/server-mon[das],type=JVMOSStatsProvider,name=jvm/
operating-system---
Children={}
Name=jvm/operating-system
arch-current=x86_64
availableprocessors-count=16
name-current=Mac OS X
version-current=10.5.7
Failed Attributes: Parent

jmxcmd>


Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team