Methods Summary |
---|
public static com.sun.appserv.management.config.ProfilerConfig | ensureDefaultInstance(com.sun.appserv.management.config.JavaConfig javaConfig)
ProfilerConfig prof = javaConfig.getProfilerConfig( );
if ( prof == null )
{
final String NAME = "profiler";
prof = javaConfig.createProfilerConfig( NAME, getOptional() );
assert prof != null;
}
return prof;
|
private static java.util.Map | getOptional()
final Map<String,String> optional = new HashMap<String,String>();
optional.put( ProfilerConfigKeys.NATIVE_LIBRARY_PATH_KEY, NATIVE_LIBRARY_PATH);
optional.put( ProfilerConfigKeys.CLASSPATH_KEY, CLASSPATH);
optional.put( ProfilerConfigKeys.ENABLED_KEY, "false");
return optional;
|
public synchronized void | testCreateRemoveProfiler()
if ( checkNotOffline( "testIllegalCreate" ) )
{
ensureDefaultInstance( getConfigConfig().getJavaConfig() );
final JavaConfig javaConfig = getConfigConfig().getJavaConfig();
javaConfig.removeProfilerConfig();
assert javaConfig.getProfilerConfig() == null :
"Can't remove ProfilerConfig from " +
JMXUtil.toString( Util.getObjectName(javaConfig) );
ensureDefaultInstance( javaConfig );
assert javaConfig.getProfilerConfig() != null;
Util.getExtra( javaConfig.getProfilerConfig() ).getMBeanInfo();
testGetters( javaConfig.getProfilerConfig() );
javaConfig.removeProfilerConfig();
ensureDefaultInstance( javaConfig );
assert javaConfig.getProfilerConfig() != null;
Util.getExtra( javaConfig.getProfilerConfig() ).getMBeanInfo();
testGetters( javaConfig.getProfilerConfig() );
}
|
private void | testGetters(com.sun.appserv.management.config.ProfilerConfig prof)
assert( prof.getClasspath() != null );
prof.setClasspath( prof.getClasspath() );
assert( prof.getNativeLibraryPath() != null );
prof.setNativeLibraryPath( prof.getNativeLibraryPath() );
assert( prof.getJVMOptions() != null );
prof.setJVMOptions( prof.getJVMOptions() );
prof.setEnabled( prof.getEnabled() );
|