Methods Summary |
---|
protected final java.lang.String | fixEJBModuleName(java.lang.String moduleName)For whatever reason the com.sun.appserv MBeans use:
=foo.jar,categor=runtime (JSR 77)
=foo_jar,category=monitor (monitoring)
We want both to be named "foo.jar" for two reasons:
(1) for consistency, (2) so that the JSR 77 MBeans can find
their corresponding monitors by name.
final String JAR = "jar";
String result = moduleName;
if ( moduleName.endsWith( "_" + JAR ) )
{
result = StringUtil.stripSuffix( moduleName, "_" + JAR ) + "." +JAR;
}
return( result );
|
protected final javax.management.ObjectName | fixEJBModuleName(javax.management.ObjectName objectNameIn, java.lang.String key)
ObjectName objectNameOut = objectNameIn;
final String origName = objectNameIn.getKeyProperty( key );
if ( origName != null )
{
final String fixedName = fixEJBModuleName( origName );
if ( ! fixedName.equals( origName ) )
{
objectNameOut = JMXUtil.setKeyProperty( objectNameIn, key, fixedName);
}
}
if ( ! objectNameOut.equals( objectNameIn ) )
{
logFiner( "MonitoringImplBase.fixEJBModuleName: modified " +
quote( objectNameIn ) + " => " + quote( objectNameOut ) );
}
return( objectNameOut );
|
public java.lang.String | getGroup()
return( AMX.GROUP_MONITORING );
|
public javax.management.ObjectName | getServerRootMonitorObjectName()
ObjectName objectName = null;
final String name = getObjectName().getKeyProperty( XTypes.SERVER_ROOT_MONITOR );
if ( name != null )
{
final MonitoringRoot root = getDomainRoot().getMonitoringRoot();
final ServerRootMonitor mon =
(ServerRootMonitor)root.getServerRootMonitorMap().get( name );
objectName = Util.getObjectName( mon );
}
return( objectName );
|
protected javax.management.ObjectName | preRegisterModifyName(javax.management.MBeanServer server, javax.management.ObjectName nameIn)See {@link #fixEJBModuleName} for info on why this is being done.
ObjectName objectNameOut = super.preRegisterModifyName( server, nameIn );
if ( nameIn.getKeyProperty( XTypes.EJB_MODULE_MONITOR ) != null )
{
objectNameOut = fixEJBModuleName( objectNameOut, XTypes.EJB_MODULE_MONITOR );
}
return objectNameOut;
|