Looks like there are several issues:
1. *For a web module within an application*:
Names are taken from two different places!
(a) The value of <web-uri> is being used for the 'web-module' property
value in type=webmodule-virtual-server:
type=webmodule-virtual-server,name=server,application=HelloWorld,category=monitor,server=server,web-module=*stateless-simple.war*
(c) The name used for the j2eeType=WebModule is taken from
<context-root> in application.xml. Ditto for type=web-module:
j2eeType=WebModule,name=//server/*helloworld*,J2EEServer=server,J2EEApplication=HelloWorld
type=web-module,name=//server/*helloworld*,application=HelloWorld,category=monitor,server=server
*Solution: *make the name used be context-root in both cases. This
applies to servlets as well.
*Alternative*: /application-name/./context-root/
*2. For a standalone web module:
*
Names are taken from two different places:
(a) The value of the "name" Attribute in <web-module> is being used for
the 'standalone-web-module' property value in
type=webmodule-virtual-server:
type=webmodule-virtual-server,name=server,category=monitor,server=server,standalone-web-module=*Car_Store**
***
**(b) The name used for j2eeType=WebModule is the <context-root> within
domain.xml:
j2eeType=WebModule,name=//server/jsf-carstore.war29357,J2EEServer=server,J2EEApplication=null
*Solution: *make the name used be context-root in both cases. This
applies to servlets as well.
*Alternative*: /web-module-name/./context-root/
*
***
*3. Other notes*
(a) There are *two* category=monitor MBeans for the same web module.
The important one is 'type=webmodule-virtual-server'. The
'type=web-module' one seems to be useless, since it has no Attributes.
Ditto for type=application.
type=webmodule-virtual-server,name=*server*,application=*HelloWorld*,category=monitor,server=server,web-module=stateless-simple.war
type=web-module,name=//server/*helloworld*,application=*HelloWorld*,category=monitor,server=server
(b) There are two JSR 77 MBeans j2eeType=WebModule for the same
WebModule within an application. One of these has J2EEApplication=null:
j2eeType=WebModule,name=//server/*rmi-iiop-simple*,J2EEServer=server,J2EEApplication=*RMIConverterApp*
j2eeType=WebModule,name=//server/*RMIConverterApp*,J2EEServer=server,J2EEApplication=null
*!**null J2EEApplication**!**
*
Lloyd
----------------
jmxcmd> find type=web-module type=webmodule-virtual-server
type=application &category=monitor j2eeType=WebModule
j2eeType=J2EEApplication
*
Applications (OK):*
j2eeType=J2EEApplication,name=*MEjbApp*,J2EEServer=server,category=runtime
type=application,name=*MEjbApp*,category=monitor,server=server
j2eeType=J2EEApplication,name=*ManagementServiceEAR*,J2EEServer=server,category=runtime
type=application,name=*ManagementServiceEAR*,category=monitor,server=server
j2eeType=J2EEApplication,name=*__ejb_container_timer_app*,J2EEServer=server,category=runtime
!no WebModule (OK)!
type=application,name=*__ejb_container_timer_app*,category=monitor,server=server
*
Applications (name mismatches and/or null J2EEApplication):*
j2eeType=J2EEApplication,name=*CartApp*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*CartApp*,J2EEServer=server,J2EEApplication=null
*!**null J2EEApplication**!***
type=application,name=*CartApp*,category=monitor,server=server
j2eeType=J2EEApplication,name=*CustomJndiFactory*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*CustomJndiFactory*,J2EEServer=server,J2EEApplication=null
*!**null J2EEApplication**!*
j2eeType=J2EEApplication,name=*ExternalJndiFactory*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*ExternalJndiFactory*,J2EEServer=server,J2EEApplication=null
*!**null J2EEApplication**!***
j2eeType=J2EEApplication,name=*HelloWorld*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*helloworld*,J2EEServer=server,J2EEApplication=HelloWorld
type=webmodule-virtual-server,name=*server*,application=*HelloWorld*,category=monitor,server=server,web-module=stateless-simple.war
!*???*!
/type=web-module,name=//server/*helloworld*,application=*HelloWorld*,category=monitor,server=server
type=application,name=*HelloWorld*,category=monitor,server=server/
j2eeType=J2EEApplication,name=*RMIConverterApp*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*rmi-iiop-simple*,J2EEServer=server,J2EEApplication=*RMIConverterApp*
j2eeType=WebModule,name=//server/*RMIConverterApp*,J2EEServer=server,J2EEApplication=null
*!**null J2EEApplication**!*
type=webmodule-virtual-server,name=*server*,application=*RMIConverterApp*,category=monitor,server=server,web-module=*rmi-simple.war*
/type=application,name=*RMIConverterApp*,category=monitor,server=server
type=web-module,name=//server/*rmi-iiop-simple*,application=//*null
J2EEApplication*//,category=monitor,server=server/**
j2eeType=J2EEApplication,name=*__JWSappclients*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*__JWSappclients*,J2EEServer=server,J2EEApplication=*__JWSappclients*
type=webmodule-virtual-server,name=*server*,application=_*_JWSappclients*,category=monitor,server=server,web-module=*sys.war*
/type=web-module,name=//server/*__JWSappclients*,application=*__JWSappclients*,category=monitor,server=server
type=application,name=*__JWSappclients*,category=monitor,server=server/
j2eeType=J2EEApplication,name=*jaxrpc-simple*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*jaxrpc-simple*,J2EEServer=server,J2EEApplication=*jaxrpc-simple*
j2eeType=WebModule,name=//server/*jaxrpc-simple*,J2EEServer=server,J2EEApplication=null
*!**null J2EEApplication**!*
type=webmodule-virtual-server,name=*server*,application=*jaxrpc-simple*,category=monitor,server=server,web-module=*jaxrpc-simple.war*
/type=application,name=*jaxrpc-simple*,category=monitor,server=server//
type=web-module,name=//server/*jaxrpc-simple*,application=*jaxrpc-simple*,category=monitor,server=server/**
j2eeType=J2EEApplication,name=*jdbc-simple*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*jdbc-simple*,J2EEServer=server,J2EEApplication=*jdbc-simple*
type=webmodule-virtual-server,name=*server*,application=*jdbc-simple*,category=monitor,server=server,web-module=*jdbc-simple.war*
/type=application,name=*jdbc-simple*,category=monitor,server=server//
type=web-module,name=//server/*jdbc-simple*,application=*jdbc-simple*,category=monitor,server=server/
j2eeType=J2EEApplication,name=*jndi-url*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*jndi-url*,J2EEServer=server,J2EEApplication=null*
!**null J2EEApplication**!*
/type=application,name=*jndi-url*,category=monitor,server=server/
j2eeType=J2EEApplication,name=*logging-helloworld*,J2EEServer=server,category=runtime
j2eeType=WebModule,name=//server/*logging-helloworld*,J2EEServer=server,J2EEApplication=*logging-helloworld
*type=webmodule-virtual-server,name=*server*,application=logging-helloworld,category=monitor,server=server,web-module=*logging-helloworld.war*
/type=application,name=*logging-helloworld*,category=monitor,server=server//
type=web-module,name=//server/*logging-helloworld*,application=*logging-helloworld*,category=monitor,server=server/
**
j2eeType=WebModule,name=//server/*SimpleMessageApp*,J2EEServer=server,J2EEApplication=null
!*ORPHAN*?!
type=application,name=*SimpleMessageApp*,category=monitor,server=server
j2eeType=WebModule,name=//server/,J2EEServer=server,J2EEApplication=null
j2eeType=WebModule,name=//__asadmin/web1,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=*__asadmin*,category=monitor,server=server,standalone-web-module=*adminapp*
j2eeType=WebModule,name=*//__asadmin/*,J2EEServer=server,J2EEApplication=null
!*ORPHAN*?!
j2eeType=WebModule,name=//__asadmin/*asadmin*,J2EEServer=server,J2EEApplication=null
!*ORPHAN*?!
type=webmodule-virtual-server,name=*__asadmin*,category=monitor,server=server,standalone-web-module=*admingui***
*ORPHANS?:*
j2eeType=WebModule,name=//server/*service*,J2EEServer=server,J2EEApplication=null
type=application,name=*InboundMessageApp*,category=monitor,server=server
*Standalone web modules:
Looks like context-root is used for the standalone-web-module property,
but the name of the app is used for WebModule.
*
j2eeType=WebModule,name=//server/*bookstore*,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=server,category=monitor,server=server,standalone-web-module=*BookstoreWAR*
j2eeType=WebModule,name=//server/*jsf-carstore.war29357*,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=server,category=monitor,server=server,standalone-web-module=*Car_Store*
j2eeType=WebModule,name=//server/*jsf-components.war29358*,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=server,category=monitor,server=server,standalone-web-module=*JavaServer_Faces_Custom_Components*
j2eeType=WebModule,name=//server/*jsf-guessNumber.war29359*,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=server,category=monitor,server=server,standalone-web-module=*JavaServer_Faces_Guess_Number_Sample_Application*
j2eeType=WebModule,name=//server/*web-basic-auth.war29364*,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=*server*,category=monitor,server=server,standalone-web-module=*Welcome_to_BASIC_Security_Zone*
j2eeType=WebModule,name=//server/web-form-auth,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=server,category=monitor,server=server,standalone-web-module=*Formauth*
j2eeType=WebModule,name=//server/*webapps-simple*,J2EEServer=server,J2EEApplication=null
type=webmodule-virtual-server,name=*server*,category=monitor,server=server,standalone-web-module=*JSP_and_Servlet_Examples*