Methods Summary |
---|
public void | adminServiceReady()See com.sun.enterprise.admin.server.core.notifyAMXThatAdminServiceIsReady()
Make a [synchronous] call to AMX. Semantics are that this should
be a quick call, not a long-running one.
// nothing by default
|
protected abstract java.lang.Object | createDomainRoot()
|
public java.lang.String | getAMXJMXDomainName()
return( BootUtil.getInstance().getAMXJMXDomainName() );
|
public java.lang.String | getAdministrativeDomainName()
return( BootUtil.getInstance().getAppserverDomainName() );
|
public final com.sun.appserv.management.DomainRoot | getDomainRoot()
final ProxyFactory factory =
ProxyFactory.getInstance( getMBeanServer() );
return( factory.getDomainRoot() );
|
public static LoaderMBean | getLoader(javax.management.MBeanServer server)
return( LOADER );
|
public void | handleMBeanRegistered(javax.management.ObjectName oldObjectName)
|
public void | handleMBeanUnregistered(javax.management.ObjectName oldObjectName)
|
public void | handleNotification(javax.management.Notification notifIn, java.lang.Object handback)
/* nothing by default */
|
private static void | initLOADER(javax.management.MBeanServer server, javax.management.ObjectName loaderObjectName)
assert( LOADER == null );
try
{
final MBeanServerConnectionSource conn = new MBeanServerConnectionSource( server );
final MBeanProxyHandler handler = new MBeanProxyHandler( conn, loaderObjectName );
LOADER = (LoaderMBean)
Proxy.newProxyInstance( LoaderMBean.class.getClassLoader(), new Class[] { LoaderMBean.class }, handler);
}
catch( IOException e )
{
assert( false ) : "can't happen";
throw new RuntimeException( e );
}
|
public abstract boolean | isDAS()
|
public boolean | isStarted()
return( mStarted );
|
private final void | loadDomainRoot()
debug( "loadDomainRoot ENTER" );
final Object domainRoot = createDomainRoot();
if ( domainRoot != null )
{
ObjectName objectName = mObjectNames.getDomainRootObjectName( );
debug( "Registering DomainRoot, impl class = " + domainRoot.getClass().getName() );
try
{
objectName = mServer.registerMBean( domainRoot, objectName ).getObjectName();
debug( "Registered DomainRoot: " + objectName );
}
catch( final Exception e )
{
final Throwable rootCause = ExceptionUtil.getRootCause(e);
debug( "Exception loading DomainRoot: " +
rootCause + ", msg=" + rootCause.getMessage() );
throw new RuntimeException( rootCause );
}
}
else
{
debug( "loadDomainRoot: NULL" );
}
debug( "loadDomainRoot DONE" );
|
protected javax.management.ObjectName | loadSystemInfo(javax.management.MBeanServer server)
debug( "loadSystemInfo" );
final BootUtil bootUtil = BootUtil.getInstance();
final SystemInfoImpl systemInfo = new SystemInfoImpl( server, bootUtil );
final ObjectName tempName = mObjectNames.getSingletonObjectName( systemInfo.J2EE_TYPE );
final ObjectName objectName = mServer.registerMBean( systemInfo, tempName ).getObjectName();
debug( "loaded SystemInfo" );
return( objectName );
|
protected boolean | mySleep(long millis)
boolean interrupted = false;
try
{
Thread.sleep( millis );
}
catch( InterruptedException e )
{
Thread.interrupted();
interrupted = true;
}
return interrupted;
|
protected static long | now()
return( System.currentTimeMillis() );
|
public void | postRegister(java.lang.Boolean registrationDone)
super.postRegister( registrationDone );
if ( registrationDone.booleanValue() )
{
initLOADER( getMBeanServer(), getObjectName() );
}
start();
postRegisterHook();
|
protected void | postRegisterHook()
|
public final javax.management.ObjectName | preRegister(javax.management.MBeanServer server, javax.management.ObjectName objectNameIn)
debug( "preRegister" );
final ObjectName superObjectName = super.preRegister( server, objectNameIn );
final String domain = BootUtil.getInstance().getAMXSupportJMXDomain();
mSelfObjectName = Util.newObjectName( domain, LOADER_NAME_PROPS );
preRegisterHook();
try
{
loadSystemInfo( server );
final MBeanServerNotificationFilter filter =
new MBeanServerNotificationFilter();
filter.enableAllObjectNames();
if ( mServer != server )
{
throw new IllegalStateException();
}
JMXUtil.listenToMBeanServerDelegate( mServer, this, filter, null );
}
catch( Exception e )
{
throw new RuntimeException( e );
}
debug( "preRegister done: " + mSelfObjectName );
return( mSelfObjectName );
|
protected void | preRegisterHook()
|
public javax.management.ObjectName | resyncAMXMBean(javax.management.ObjectName amx)
// do nothing
return amx;
|
protected void | start()
synchronized( this )
{
if ( mStarted )
{
throw new IllegalArgumentException( "Can't start Loader twice" );
}
mStarted = true;
}
new AMXDebugSupport( mServer );
loadDomainRoot();
startHook();
(new CheckStartedThread()).start();
|
protected void | startHook()
// nothing
|
public javax.management.ObjectName | sync(javax.management.ObjectName name)
throw new UnsupportedOperationException( "sync" );
|