Fields Summary |
---|
public static final String | TYPE_DASDAdmin service type DASD. Used to identify admin service in a server
instance that acts as DAS and also allows normal server operations like
deployment and running of user applications. |
public static final String | TYPE_DASAdmin service type DAS. Used to identify admin service in a server
instance dedicated to administration. |
public static final String | TYPE_SERVERAdmin service type SERVER. Used to identify admin service in a server
instance dedicated to running user applications. |
public static final boolean | ENABLE_PERFORMANCE_THREAD |
public static final Logger | sLoggerThe logger from LogDomains |
private static final com.sun.enterprise.util.i18n.StringManager | localStrings |
private static AdminService | adminService |
private static final String | COM_SUN_APPSERV |
private static final String | ADMIN_DOMAIN_NAME_PREFIXprefix for administrative domain name |
private static final String | DEF_ADMIN_DOMAIN_NAMEdefault administrative domain name |
private static final String | kTempDirNamePrefix |
private static final String | kGUITempDirName |
private static final String | kTempDirNameSuffix |
private static final String | SS_MBEAN_CLASS |
private volatile String | adminServiceType |
private volatile com.sun.enterprise.server.ServerContext | context |
private volatile com.sun.enterprise.admin.AdminContext | adminContext |
private volatile com.sun.appserv.server.ServerLifecycle | adminChannel |
private volatile String | mTempDirPath |
private volatile String | mGUITempDirPath |
public static final String | PRIVATE_MBEAN_DOMAIN_NAMEA field to denote the default name for all the config and runtime mbeans that are
generated from the meta-information (descriptor, like admin-mbean-descriptor.xml) |
public static final String | DAS_DIAGNOSTIC_MBEAN_CLASS_NAME |
private final AutoDeployStarter | autoDeployStarter |
private static final String | ADMIN_JAVAROOT |
private static final String | PLUGIN_JAVAROOT |
private static final String | AMX_DAS_LOADER_CLASSNAME |
private static final String | AMX_NON_DAS_LOADER_CLASSNAME |
public static final String | AMX_LOADER_DEFAULT_OBJECTNAME |
private volatile ObjectName | mAMXLoaderObjectName |
Methods Summary |
---|
public boolean | canRunUserApps()Is admin service running in a server instance that is primarily intended
for running user applications. Admin service runs in all server
instances, but sometimes there is one server instance dedicated to
administration of other instances in the domain and user applications
can not not be run on that instance.
if (TYPE_DAS.equals(adminServiceType)) {
return false;
} else {
return true;
}
|
static com.sun.enterprise.admin.server.core.AdminService | createAdminService(com.sun.enterprise.server.ServerContext sc)Create admin service. Admin Service is initialized by an internal
lifecycle module (AdminServiceLifeCycle).
System.setProperty("com.sun.aas.admin.logger.name",
AdminConstants.kLoggerName);
String type = TYPE_SERVER;
if (ServerManager.ADMINSERVER_ID.equals(sc.getInstanceName())) {
type = TYPE_DAS;
}
ConfigContext cc = sc.getConfigContext();
try {
com.sun.enterprise.config.serverbeans.AdminService as =
ServerBeansFactory.getConfigBean(cc).getAdminService();
if (as != null) {
type = as.getType();
}
} catch (ConfigException ce) {
ce.printStackTrace();
sLogger.log(Level.WARNING, "core.admin_service_default_config",
type);
}
AdminService as = instantiateAdminService(type);
as.setContext(sc);
AdminContext ac = sc.getPluggableFeatureFactory().getAdminContext();
if (ac instanceof AdminContextImpl) {
((AdminContextImpl)ac).setServerContext((ServerContextImpl)sc);
}
as.setAdminContext(ac);
setAdminService(as);
return as;
|
private void | createDASDiagnosticMBean()
try {
final MBeanServer mbs = getMBeanServer();
ObjectName on = new ObjectName(
PRIVATE_MBEAN_DOMAIN_NAME + ":" +
"type=DomainDiagnostics,name=" + getInstanceName() + ",category=monitor");
Class cl = Class.forName(DAS_DIAGNOSTIC_MBEAN_CLASS_NAME);
mbs.registerMBean(cl.newInstance(), on);
} catch (Throwable t) {
t.printStackTrace();
sLogger.log(Level.INFO, "core.das_diag__mbean_not_registered", t.getMessage());
}
|
private void | createTempDir()
try {
String domainName = ServerManager.instance().getDomainName();
String localTmpDir = System.getProperty("java.io.tmpdir");
String asTempDirName = kTempDirNamePrefix + domainName +
context.getInstanceName() + kTempDirNameSuffix;
/* for admin server, e.g. </tmp>/s1astempdomain1admin-server */
File tempFolder = new File(localTmpDir, asTempDirName);
mTempDirPath = tempFolder.getCanonicalPath();
/* for GUI, e.g. </tmp>/s1astempdomain1admin-server/gui*/
File guiTempFolder = new File(mTempDirPath, kGUITempDirName);
mGUITempDirPath = guiTempFolder.getCanonicalPath();
if (tempFolder.exists()) {
/*
If it exists, the delete method during earlier admin-server
lifecycle was not able to delete the directory and
that should be OK. The intent here is to create a
directory if there does not exist one.
*/
sLogger.log(Level.FINEST, "core.tmp_folder_exists",
mTempDirPath);
return;
}
/* try to create admin-server's temporary directory */
boolean couldCreate = tempFolder.mkdirs();
if (! couldCreate) {
sLogger.log(Level.WARNING, "core.tmp_folder_creation_failed",
mTempDirPath);
}
else {
sLogger.log(Level.FINEST, "core.tmp_folder_created_ok",
mTempDirPath);
}
/* try to create temporary directory for GUI*/
couldCreate = guiTempFolder.mkdirs();
if (! couldCreate) {
sLogger.log(Level.WARNING, "core.gui_tmp_folder_creation_failed",
mGUITempDirPath);
}
else {
sLogger.log(Level.FINEST, "core.gui_tmp_folder_created_ok",
mGUITempDirPath);
}
}
catch(Throwable t) {
sLogger.log(Level.WARNING, "core.tmp_folder_creation_failed", t);
}
|
private void | createTimeStampFilesForInstances()Creates the time stamp files (if do not exist) for the instances that the
admin server manages.
String[] instanceIds = ServerManager.instance().getInstanceNames(true);
for (int i = 0 ; i < instanceIds.length ; i ++) {
try {
String instanceId = instanceIds[i];
InstanceEnvironment ie = new InstanceEnvironment(instanceId);
ie.createTimeStampFiles();
sLogger.log(Level.FINE, "core.ts_files_ok", instanceId);
}
catch (Exception e) {
//Log the exception for this instance, squelching is OK?
sLogger.log(Level.WARNING, "core.ts_files_failed", e);
}
}
|
private void | deleteTempDir()
try {
FileUtils.whack(new File(mTempDirPath));
sLogger.log(Level.FINEST, "core.tmp_folder_deleted_ok",
mTempDirPath);
}
catch(Throwable t) {
sLogger.log(Level.WARNING, "core.tmp_folder_deletion_failed",
mTempDirPath);
}
|
void | destroy()Destroy admin service. This is called just before JVM is destroyed.
|
public com.sun.enterprise.admin.AdminContext | getAdminContext()Get admin context.
return adminContext;
|
public static com.sun.enterprise.admin.server.core.AdminService | getAdminService()Get admin service object. Admin service is started when server starts
up.
return adminService;
|
public java.lang.String | getAdministrativeDomainName()Returns the administrative domain name for this server. If
administrative domain name property is not defined,
DEF_ADMIN_DOMAIN_NAME is returned.
String serverName = adminContext.getServerName();
ConfigContext ctx = adminContext.getAdminConfigContext();
String aDomainName =
ServerHelper.getAdministrativeDomainName(ctx, serverName);
// return default administrative domain name if administrative domain
// name property is not defined
if ( (aDomainName == null) || ("".equals(aDomainName)) ) {
return DEF_ADMIN_DOMAIN_NAME;
} else {
return ADMIN_DOMAIN_NAME_PREFIX + aDomainName;
}
|
public com.sun.enterprise.server.ServerContext | getContext()Get server context.
return ((adminService == null) ? null : adminService.context);
|
public java.lang.String | getGUITempDirPath()Gets the name of the temporary folder where the admin-GUI would be
creating some temporary data. Note that this method is not a pure
accessor in the sense that it will create the folder on disk if
it does not exist.
if (mGUITempDirPath == null) {
/* Give it one more try, if on the startup the
user does not have enough space and/or the temp
file was not created. Note that the first-time failure will
be detected in the log at startup.
Also note that this additional safety does not come without
the overhead of the null check for every call to this function.
*/
createTempDir();
}
else {
final File gd = new File(mGUITempDirPath);
if (!gd.exists()) {
final boolean s = gd.mkdirs();
if (!s) {
sLogger.log(Level.WARNING, "core.gui_tmp_folder_creation_failed", mGUITempDirPath);
}
}
}
return ( mGUITempDirPath );
|
public java.lang.String | getInstanceName()Get name of server instance.
return ((context == null) ? null : context.getInstanceName());
|
private javax.management.ObjectName | getLogManagerMBeanName()
Properties props = new Properties();
props.put("server", adminContext.getServerName());
props.put("category", "runtime");
props.put("name", "logmanager");
ObjectName on = new ObjectName(adminContext.getDomainName(), props);
return on;
|
private static javax.management.MBeanServer | getMBeanServer()
return FeatureAvailability.getInstance().getMBeanServer();
|
public com.sun.enterprise.admin.monitor.GenericMonitorMBean | getRootMonitorMBean()Get root monitoring MBean. Monitoring MBeans within a server instance
are organized in a tree. This object represents the root of the tree.
return GenericMonitorMBean.getRoot();
|
public java.lang.String | getTempDirPath()Gets the name of the temporary folder where the admin-server would be
creating some temporary data. Note that this method is not a pure
accessor in the sense that it will create the folder on disk if
it does not exist.
if (mTempDirPath == null) {
/* Give it one more try, if on the startup the
user does not have enough space and/or the temp
file was not created. Note that the first-time failure will
be detected in the log at startup.
Also note that this additional safety does not come without
the overhead of the null check for every call to this function.
*/
createTempDir();
}
return ( mTempDirPath );
|
public java.lang.String | getType()Get admin service type. Admin service type is defined in admin service
configuration.
return adminServiceType;
|
void | init()Initialize admin service. This is called just after creating the
instance and before any public methods are called on admin service.
Initializes the admin server's MBeanServer.
Currently initializes the MBeanServer with default implementation in
com.sun.enterprise.admin.server.core.jmx.MBeanServerImpl.
Should there be multiple implementations, this method needs to be
modified.
if (isDas()) {
// remove restart required state file when starting up DAS
RRStateFactory.removeStateFile();
}
adminChannel = new AdminChannelLifecycle();
adminChannel.onInitialization(context);
// Publish PID for this VM in the config directory
// This publishing has to happen after the AdminService init
publishPID();
final DynamicInterceptor dyn = (DynamicInterceptor)getMBeanServer();
final MBeanServer delegateMBeanServer = dyn.getDelegateMBeanServer();
adminContext.setMBeanServer( dyn );
final SunoneInterceptor sunone =
SunoneInterceptor.createInstance(adminContext, dyn, delegateMBeanServer);
dyn.addHook( COM_SUN_APPSERV, sunone );
FeatureAvailability.getInstance().registerFeature(
FeatureAvailability.SUN_ONE_INTERCEPTOR_FEATURE, "true");
AMXLoggingHook.enableLoggingHook();
sunone.registerConfigMBeans();
sLogger.log(Level.INFO, "core.sunone_interceptor_enabled");
initCallFlow();
//initialize JKS properties.
setupJKS();
|
private void | initCallFlow()
try {
final Class cl = Class.forName(
"com.sun.enterprise.admin.monitor.callflow.AgentImpl");
final Method method = cl.getMethod("getInstance", null);
final Agent agent = (Agent) method.invoke(null, null);
Switch.getSwitch().setCallFlowAgent(agent);
} catch (Throwable t) {
sLogger.log(Level.SEVERE, "core.callflow_agent_init_failed", t);
Switch.getSwitch().setCallFlowAgent(new AgentAdapter());
}
|
private void | initLogManagerReconfigSupport()
registerLogManagerMBean();
registerLogManagerEventListener();
registerDynamicReconfigEventListener();
|
private void | initializeAMXMBeans(boolean isDAS)Initializes AMX MBeans
Uses Class.forName() due to build-order issues.
try {
// can't 'import' it because it's in the admin module, which
// compiles after the module this file is in.
final String loaderClassname =
isDAS ? AMX_DAS_LOADER_CLASSNAME : AMX_NON_DAS_LOADER_CLASSNAME;
final Class loaderClass = Class.forName( loaderClassname );
final Object loader = loaderClass.newInstance();
ObjectName tempObjectName = new ObjectName( AMX_LOADER_DEFAULT_OBJECTNAME );
mAMXLoaderObjectName =
getMBeanServer().registerMBean( loader, tempObjectName ).getObjectName();
sLogger.log(Level.INFO, "mbean.init_amx_success");
}
catch(Exception e) {
// this is really a fatal error; not even the AMX loader works
sLogger.log(Level.SEVERE, "mbean.init_amx_failed", e);
throw new RuntimeException( e );
}
|
private void | initializeDottedNames()MBeanRegistry is used to generate all dotted names
available in the system. This is achived by iterating
through domain.xml and generating object name and
dotted name for every element (some special cases)
Dotted name is generated from the descriptor entry
Once these are generated, an mbean is notified about
these dotted names. In short, this mbean will keep track
of the dotted names and is used by cli for get/set
commands
try {
MBeanRegistry mr = MBeanRegistryFactory.getAdminMBeanRegistry();
mr.generateAndRegisterAllDottedNames(context.getConfigContext(),
context.getDefaultDomainName());
} catch (Throwable t) {
sLogger.log(Level.WARNING, "admin.dotted_names_init_exception", t);
}
|
private void | initializeMBeanEventListeners()
try {
Class c = null; //Class for listener of MBeanElementChange events
if (this.isDas()) {
c = Class.forName("com.sun.enterprise.admin.mbeans.custom.InProcessMBeanElementChangeEventListenerImpl");
}
else {
c = Class.forName("com.sun.enterprise.ee.admin.mbeans.RemoteMBeanElementChangeEventListenerImpl");
}
final Object o = c.newInstance();
AdminEventListenerRegistry.addEventListener(MBeanElementChangeEvent.EVENT_TYPE, (MBeanElementChangeEventListener)o);
} catch (final Exception e) {
e.printStackTrace(); //ok to squelch
}
|
private void | initializePerInstanceSystemService()Registers the file transfer service (aka SystemServicesMBean) that will
be registered in all the instances. Note that this MBean will have slightly
different ObjectName depending upon where it is registered.
ObjectName on = null;
try {
final MBeanServer mbs = getMBeanServer();
on = ObjectNames.getPerInstanceSystemServicesObjectName(this.getInstanceName());
final Object impl = Class.forName(SS_MBEAN_CLASS).newInstance();
mbs.registerMBean(impl, on);
sLogger.finer("Admin Message: System Services MBean Registered with on: " + on.toString());
}
catch (final Exception e) {
sLogger.log(Level.WARNING, "core.system.service.mbean.not.registered", on.toString());
}
|
private void | initiateCustomMBeanLoading()
try {
final MBeanServer mbs = getMBeanServer();
final ConfigContext cc = context.getConfigContext();
new CustomMBeanRegistrationHelper(mbs, cc).registerMBeans();
} catch (final Exception e) {
sLogger.log(Level.WARNING, "core.custom.mbean.registration.failure");
}
initializeMBeanEventListeners();
|
private static com.sun.enterprise.admin.server.core.AdminService | instantiateAdminService(java.lang.String type)Instantiate admin service. This method verifies that specified type
is a known type and then creates an admin service object initialized
for the specified type.
AdminService as = null;
if (TYPE_DASD.equals(type) || TYPE_DAS.equals(type)
|| TYPE_SERVER.equals(type)) {
as = new AdminService();
as.setType(type);
} else {
throw new RuntimeException(localStrings.getString(
"admin.server.core.unknown_admin_service_type", type));
}
return as;
|
public boolean | isAdminInstance()Is this admin service running within admin server instance. Admin service
runs in all server instances.
if (ServerManager.ADMINSERVER_ID.equals(context.getInstanceName())) {
return true;
} else {
return false;
}
|
private boolean | isDAS()
return ServerHelper.isDAS(
AdminService.getAdminService().getAdminContext().getAdminConfigContext(),
context.getInstanceName());
|
public boolean | isDas()Is admin service configured for administration of domain. A domain has
several server instances and typically one of them is capable of
administering the other server instances in the domain.
if (TYPE_DASD.equals(adminServiceType)
|| TYPE_DAS.equals(adminServiceType)) {
return true;
} else {
return false;
}
|
private void | notifyAMXThatAdminServiceIsReady()Make a [synchronous] call to AMX. Semantics are that this should
be a quick call, not a long-running one.
try {
getMBeanServer().invoke( mAMXLoaderObjectName, "adminServiceReady", null, null );
}
catch( Exception e ) {
throw new RuntimeException( e );
}
|
private void | notifyNodeagents()
try {
if (isDAS()) {
Class naNotifierClass = Class.forName(
"com.sun.enterprise.ee.nodeagent.NodeAgentNotifier");
Class[] params = new Class[1];
params[0] = ServerContext.class;
Constructor c = naNotifierClass.getConstructor(params);
Object naNotifier = c.newInstance(context);
Thread notifyNodeAgents = new Thread((Runnable)naNotifier);
notifyNodeAgents.setDaemon(true);
notifyNodeAgents.start();
}
} catch (ConfigException ex) {
ex.printStackTrace();
sLogger.log(Level.WARNING, "core.could_not_determine_whether_instance_is_das");
} catch (Exception ex) {
ex.printStackTrace();
sLogger.log(Level.WARNING,
"core.notification_for_nodeagents_could_not_be_invoked");
}
|
private void | publishPID()
JvmInfoUtil jvminfo = new JvmInfoUtil();
System.out.println(System.getProperty("com.sun.aas.instanceRoot") +
"/config/" + SystemPropertyConstants.PID_FILE);
jvminfo.logPID(System.getProperty("com.sun.aas.instanceRoot") +
File.separator + "config" + File.separator +
SystemPropertyConstants.PID_FILE);
|
void | ready()Admin service is ready. All other services have started up successfully.
if (adminChannel != null) {
adminChannel.onReady(context);
}
initiateCustomMBeanLoading();
registerJVMMonitoringMBeans();
// would be cleaner to issue JMX Notifications for a variety
// of events, but that would mean adding an MBean for AdminService.
notifyAMXThatAdminServiceIsReady();
// notify all node agents in this domain to know THIS DAS. This is
// useful when DAS has moved. Also, only the running Node Agents will
// be notified.
notifyNodeagents();
if (isDas()) {
// autoDeployStarter *must* run in a separate thread, or the
// this call won't return because it will wait for the server
// to start using the current thread, which must return in order
// for the server to be considered to have started.
autoDeployStarter.submit(RunnableBase.HowToRun.RUN_IN_SEPARATE_THREAD);
}
NoopClusterEventListener noop = new NoopClusterEventListener();
if (!isDas()) {
AdminEventListenerRegistry.addEventListener(ClusterEvent.eventType, noop);
}
|
private void | registerDynamicReconfigEventListener()
AdminEventListenerRegistry.addEventListener(
DynamicReconfigEvent.eventType, new
com.sun.enterprise.admin.server.core.channel.DynamicReconfigEventListenerImpl());
|
private void | registerJVMMonitoringMBeans()
try {
// Use a dummy ObjectName; the MBeans modify the supplied one
final ObjectName dummy = new ObjectName("dummy:name=dummy");
if (this.isDas()) {
final Object jvmInfoCollector =
Class.forName("com.sun.enterprise.admin.mbeans.jvm.JVMInformationCollector").newInstance();
// com.sun.appserv:type=JVMInformationCollector,category=monitor,server=server
final ObjectName actualObjectName =
getMBeanServer().registerMBean( jvmInfoCollector, dummy).getObjectName();
}
// com.sun.appserv:type=JVMInformation,category=monitor,server=server
final Object jvmInfo = Class.forName("com.sun.enterprise.admin.mbeans.jvm.JVMInformation").newInstance();
final ObjectName actualObjectName = getMBeanServer().registerMBean( jvmInfo, dummy ).getObjectName();
}
catch ( final Exception e) {
sLogger.log(Level.WARNING, "core.jvm.mbeans.not.registered");
}
|
private void | registerLogManagerEventListener()
AdminEventListenerRegistry.addLogLevelChangeEventListener(
new com.sun.enterprise.server.logging.LogLevelChangeEventListenerImpl());
|
private void | registerLogManagerMBean()
final MBeanServer mbs = FeatureAvailability.getInstance().getMBeanServer();
try {
Object mbean =
com.sun.enterprise.server.logging.LogMBean.getInstance();
mbs.registerMBean(mbean, getLogManagerMBeanName());
} catch (Throwable t) {
sLogger.log(Level.WARNING, "core.logmgr_mbean_not_registered");
sLogger.log(Level.FINE, "core.logmgr_mbean_register_error", t);
}
|
private void | registerTransactionsRecoveryEventListener()
try
{
AdminEventListenerRegistry.addEventListener(
TransactionsRecoveryEvent.eventType,
(AdminEventListener)(new com.sun.enterprise.transaction.TransactionsRecoveryEventListenerImpl()));
}
catch (Throwable t)
{
sLogger.log(Level.WARNING, "admin.transactions_recovery_listener_registration_exception", t);
}
|
private void | registerTransactionsRecoveryEventMBean()
try {
MBeanRegistryFactory.getAdminMBeanRegistry().instantiateMBean(
"transactions-recovery", new String[]{adminContext.getDomainName()}, null, null, true );
} catch (Throwable t) {
sLogger.log(Level.FINE, "core.transactions_recovery_mbean_register_error", t);
}
|
protected void | setAdminContext(com.sun.enterprise.admin.AdminContext ctx)Set admin context.
adminContext = ctx;
adminContext.setMBeanServer( getMBeanServer() );
|
private void | setAdminInstanceProperties()Set system properties for admin server instance. Some of the admin code
relies on the property com.sun.aas.javaRoot . This method
will initialize the property using the value set by JVM plugin. If the
property is already set, it will not be changed.
try {
String adminJavaRoot = System.getProperty(ADMIN_JAVAROOT);
String pluginJavaRoot = System.getProperty(PLUGIN_JAVAROOT);
if (adminJavaRoot == null) {
if (pluginJavaRoot != null) {
System.setProperty(ADMIN_JAVAROOT, pluginJavaRoot);
} else {
sLogger.log(Level.WARNING, "core.no_java_home");
}
}
} catch (Throwable t) {
sLogger.log(Level.WARNING, "core.set_admin_property_failed");
sLogger.log(Level.FINE, "general.unexpected_exception", t);
}
|
private static void | setAdminService(com.sun.enterprise.admin.server.core.AdminService srv)Set AdminService. This method should be called by createInstance()
method after instantiating the service. This enables other objects to use
static method getAdminService to get access to admin service.
adminService = srv;
|
void | setContext(com.sun.enterprise.server.ServerContext ctx)Set context to specified value. Typically, lifecycle manager will call
this method during initialization to set appropriate context.
context = ctx;
|
private void | setType(java.lang.String type)Set type of admin service.
adminServiceType = type;
|
private void | setupJKS()
String configDir = System.getProperty("com.sun.aas.instanceRoot") +
File.separator + "config";
java.io.File nssFile = new File(configDir, "key3.db");
if (!nssFile.exists()) {
if (System.getProperty("javax.net.ssl.keyStore") == null) {
System.setProperty("javax.net.ssl.keyStore", configDir +
File.separator + "keystore.jks");
System.setProperty("javax.net.ssl.trustStore", configDir +
File.separator + "cacerts.jks");
}
}
|
void | start()Start admin service. This is called prior to any public method call
on admin service. This should be used to prepare admin service to
receive public method calls.
com.sun.enterprise.ManagementObjectManager mgmtObjManager = com.sun.enterprise.Switch.getSwitch().getManagementObjectManager();
if (isDas()) {
startAdminInstance();
mgmtObjManager.registerJ2EEDomain();
}
initializeAMXMBeans( isDas() );
// Register JVM and J2EEServer managed objects
mgmtObjManager.registerJVM();
mgmtObjManager.registerJ2EEServer();
if (isDas()) {
// das j2ee server should have been registered prior to this
// so
// mgmtObjManager.registerJ2EEServer() should run before this
mgmtObjManager.registerDasJ2EEServers();
mgmtObjManager.registerAllJ2EEClusters();
}
if (canRunUserApps()) {
startNormalInstance();
}
initializePerInstanceSystemService();
//This code initializes dotted names by enumerating
// all objectnames using domain.xml
initializeDottedNames();
registerTransactionsRecoveryEventMBean();
mgmtObjManager.registerTransactionService();
// initialize the Web Service Container services
WsUtil.start();
// register DASDiagnosticMBean
createDASDiagnosticMBean();
|
private void | startAdminInstance()Helper method to start admin server instance
setAdminInstanceProperties();
// Test code here
// new com.sun.enterprise.admin.event.EventTester();
// Uncomment following line to test monitoring
// new com.sun.enterprise.admin.monitor.MonitoringTester();
createTempDir();
|
private void | startNormalInstance()Helper method to start normal (non-admin) instances
initLogManagerReconfigSupport();
registerTransactionsRecoveryEventListener();
// Test code here
// new com.sun.enterprise.admin.event.EventTester("str");
|
void | stop()Stop admin service. This is called when shutdown process starts.
if (adminChannel != null) {
adminChannel.onShutdown();
}
com.sun.enterprise.ManagementObjectManager mgmtObjManager = com.sun.enterprise.Switch.getSwitch().getManagementObjectManager();
//FIXE ME - Prakash
// Unregister J2EEDomain, j2eeserver and jvm managed objects.
if (isDas()) {
//stop checking for manual changes
if(ENABLE_PERFORMANCE_THREAD) ManualChangeTracker.stop();
stopAdminInstance();
}
if (canRunUserApps()) {
//autodeploy service stoped
autoDeployStarter.waitDone();
autoDeployStarter.stopAutoDeployService();
stopNormalInstance();
}
// as we are killing the VM, there is no real need of shutting down MBS.
|
private void | stopAdminInstance()Helper method to stop admin server instance.
deleteTempDir();
|
private void | stopNormalInstance()Helper method to stop normal (non-admin) instances
|