Methods Summary |
---|
public com.sun.enterprise.config.ConfigContext | getAdminConfigContext()
return adminConfigContext;
|
private com.sun.enterprise.config.pluggable.ConfigEnvironment | getAdminConfigEnvironment(java.lang.String configFileName)
ConfigEnvironment ce = EnvironmentFactory.getEnvironmentFactory().
getConfigEnvironment();
ce.setUrl(configFileName);
ce.setReadOnly(false);
ce.setCachingEnabled(false);
ce.setRootClass("com.sun.enterprise.config.serverbeans.Domain");
ce.setHandler("com.sun.enterprise.config.serverbeans.ServerValidationHandler");
ce.getConfigBeanInterceptor().setResolvingPaths(false);
return ce;
|
public java.util.logging.Logger | getAdminLogger()
return adminLogger;
|
public java.net.URL | getAdminMBeanRegistryURL()
if(adminMBeanRegistryURL==null) {
try {
//PE standard
adminMBeanRegistryURL = MBeanRegistry.class.getResource(ADMIN_DESCRIPTORS_FILENAME);
} catch (Throwable t) {
adminLogger.log(Level.WARNING, "core.adminconfig_adminregistry_not_found",
ADMIN_DESCRIPTORS_FILENAME);
}
}
return adminMBeanRegistryURL;
|
public java.lang.String | getDomainName()
return domainName;
|
public java.lang.String | getDottedNameMBeanImplClassName()
return "com.sun.enterprise.admin.mbeans.DottedNameGetSetMBeanImpl";
|
public javax.management.MBeanServer | getMBeanServer()
return mbeanServer;
|
public com.sun.enterprise.admin.util.proxy.Interceptor | getMBeanServerInterceptor()
if (configInterceptor == null) {
configInterceptor = new ConfigInterceptor(this);
}
return configInterceptor;
|
public com.sun.enterprise.config.ConfigContext | getRuntimeConfigContext()
return runtimeConfigContext;
|
public java.net.URL | getRuntimeMBeanRegistryURL()
if(runtimeMBeanRegistryURL==null) {
try {
//PE standard
runtimeMBeanRegistryURL = MBeanRegistry.class.getResource(RUNTIME_DESCRIPTORS_FILENAME);
} catch (Throwable t) {
adminLogger.log(Level.WARNING, "core.adminconfig_runtimeregistry_not_found",
RUNTIME_DESCRIPTORS_FILENAME);
}
}
return runtimeMBeanRegistryURL;
|
public java.lang.String | getServerName()
return serverName;
|
protected void | registerConfigAdjustmentListener()
// Added mechanism to avoid unadjusted domain.xml.<->MBeans<->dotted_names
adminConfigContext.addConfigContextEventListener((ConfigContextEventListener)(new AdminConfigEventListener()));
|
protected void | registerValidator()
// Added reflection mechanism to avoid compile time error
try {
Class cl = Class.forName("com.sun.enterprise.config.serverbeans.validation.DomainMgr");
adminConfigContext.addConfigContextEventListener((ConfigContextEventListener)cl.newInstance());
} catch (Exception ex) {
adminLogger.log(Level.WARNING, "core.admin_validator_not_registered", "Error registering validator, config validator will not be available");
adminLogger.log(Level.FINE, "core.admin_validator_register_error", ex.getMessage());
}
|
public void | setAdminConfigContext(com.sun.enterprise.config.ConfigContext ctx)
|
public void | setAdminLogger(java.util.logging.Logger logger)
adminLogger = logger;
|
public void | setAdminMBeanRegistryURL(java.net.URL url)
adminMBeanRegistryURL = url;
|
public void | setDomainName(java.lang.String name)
// domainName = name;
|
public void | setMBeanServer(javax.management.MBeanServer mbs)
mbeanServer = mbs;
|
public void | setMBeanServerInterceptor(com.sun.enterprise.admin.util.proxy.Interceptor interceptor)
|
public void | setRuntimeConfigContext(com.sun.enterprise.config.ConfigContext ctx)
if (serverContext != null) {
serverContext.setConfigContext(ctx);
}
|
public void | setRuntimeMBeanRegistryURL(java.net.URL url)
runtimeMBeanRegistryURL = url;
|
public void | setServerContext(com.sun.enterprise.server.ServerContextImpl srvCtx)
serverContext = srvCtx;
runtimeConfigContext = serverContext.getConfigContext();
String configFileName = serverContext.getServerConfigURL();
try {
adminConfigContext = ConfigContextFactory.createConfigContext(
getAdminConfigEnvironment(configFileName));
this.setServerName(srvCtx.getInstanceName());
// Registering the config validator
if (ServerHelper.isDAS(srvCtx.getConfigContext(), srvCtx.getInstanceName())) {
registerValidator();
registerConfigAdjustmentListener();
}
} catch (ConfigException ce) {
adminLogger.log(Level.SEVERE, "core.determining_server_instance_failed",
ce);
} catch (RuntimeException ce) {
adminLogger.log(Level.SEVERE, "core.admin_config_read_error",
ce.getMessage());
adminLogger.log(Level.WARNING, "core.admin_config_read_error_trace",
ce);
throw ce;
}
adminLogger.log(Level.FINEST, "core.log_config_id_runtime",
new Long(runtimeConfigContext.hashCode()));
adminLogger.log(Level.FINEST, "core.log_config_is_admin",
new Long(adminConfigContext.hashCode()));
serverName = serverContext.getInstanceName();
|
public void | setServerName(java.lang.String serverName)
this.serverName = serverName;
|