Methods Summary |
---|
void | createLeafMBean(Descriptor descriptor)Create jsr77 mBean for the leaf object
In case of application loader it will be a NO-OP
if (descriptor instanceof EjbDescriptor) {
EjbDescriptor ejbDescriptor = null;
try {
ejbDescriptor = (EjbDescriptor) descriptor;
} catch (Exception e) {
throw new MBeanException(e);
}
Switch.getSwitch().getManagementObjectManager().createEJBMBean(ejbDescriptor,
this.configManager.getInstanceEnvironment().getName());
} else if (descriptor instanceof ConnectorDescriptor) {
ConnectorDescriptor cd = null;
try {
cd = (ConnectorDescriptor) descriptor;
} catch (Exception e) {
throw new MBeanException(e);
}
Switch.getSwitch().getManagementObjectManager().createRARMBean(cd,
this.configManager.getInstanceEnvironment().getName());
}
|
void | createLeafMBeans()Create jsr77 mBeans for all components within this application
try {
Switch.getSwitch().getManagementObjectManager().createAppMBeans(
this.application,
this.configManager.getInstanceEnvironment().getName(),
this.configManager.getLocation(this.id));
} catch (Exception e) {
throw new MBeanException(e);
}
|
void | createRootMBean()Create jsr77 root mBean
try {
Switch.getSwitch().getManagementObjectManager().createAppMBean(
this.application,
this.configManager.getInstanceEnvironment().getName(),
this.configManager.getLocation(this.id));
Switch.getSwitch().getManagementObjectManager().createAppMBeanModules(
this.application,
this.configManager.getInstanceEnvironment().getName(),
this.configManager.getLocation(this.id));
} catch (Exception e) {
throw new MBeanException(e);
}
|
void | deleteLeafAndRootMBeans()Delete jsr77 mBeans for the application and its' components
deleteLeafMBeans();
deleteRootMBean();
|
void | deleteLeafMBean(Descriptor descriptor)Delete jsr77 mBean for the leaf object
In case of application loader it will be a NO-OP
if (descriptor instanceof EjbDescriptor) {
EjbDescriptor ejbDescriptor = null;
try {
ejbDescriptor = (EjbDescriptor) descriptor;
} catch (Exception e) {
throw new MBeanException(e);
}
Switch.getSwitch().getManagementObjectManager().deleteEJBMBean(ejbDescriptor,
this.configManager.getInstanceEnvironment().getName());
} else if (descriptor instanceof ConnectorDescriptor) {
ConnectorDescriptor cd = null;
try {
cd = (ConnectorDescriptor) descriptor;
} catch (Exception e) {
throw new MBeanException(e);
}
Switch.getSwitch().getManagementObjectManager().deleteRARMBean(cd,
this.configManager.getInstanceEnvironment().getName());
}
|
void | deleteLeafMBeans()Delete jsr77 mBeans for all components within this application
Switch.getSwitch().getManagementObjectManager().deleteAppMBeans(this.application,
this.configManager.getInstanceEnvironment().getName());
|
void | deleteRootMBean()Delete jsr77 root mBean
Switch.getSwitch().getManagementObjectManager().deleteAppMBean(this.application,
this.configManager.getInstanceEnvironment().getName());
|
protected boolean | doLoad(boolean jsr77)Called from ApplicationManager. Called to load an application.
This routine creates the EJB and MDB container.
boolean allModulesDeployed = false;
// Possible values for loading:
// 1. LOAD_ALL is for loading regular application
// 2. LOAD_RAR is for loading the rar part of the embedded rar
// 3. LOAD_REST is for loading the rest part of the embedded rar
// Embedded rar is loaded in two steps so we can create connector
// resources in between.
//set default value
if (loadUnloadAction == Constants.LOAD_UNSET) {
loadUnloadAction = Constants.LOAD_ALL;
}
if (loadUnloadAction == Constants.LOAD_ALL ||
loadUnloadAction == Constants.LOAD_RAR) {
notifyAppEvent(ApplicationEvent.BEFORE_APPLICATION_LOAD);
allModulesDeployed = loadRars(jsr77);
if (loadUnloadAction == Constants.LOAD_RAR) {
return allModulesDeployed;
}
}
// Now load the EJB 3.0 persistence entities.
allModulesDeployed = loadPersistenceUnits();
if(!allModulesDeployed) return false;
if (allModulesDeployed) {
allModulesDeployed = loadEjbs(jsr77);
notifyAppEvent(ApplicationEvent.AFTER_APPLICATION_LOAD);
}
if (!allModulesDeployed) {
// remove all loaded pars
unloadPersistenceUnits();
return allModulesDeployed;
}
loadWebserviceEndpoints(jsr77);
// The web modules of this application are loaded from
// J2EERunner.confPostInit() as part of the WebContainer start()
// method
return allModulesDeployed;
|
public boolean | isForceDeploy()
return this.isForceDeploy;
|
public void | setForceDeploy(boolean isForceDeploy)
this.isForceDeploy = isForceDeploy;
|
void | setState(int state)Set the state for the rootMBean
if (application == null) {
//the application object can be null if this is a redeployment
//of an app that previously failed to load. at the point of
//failure we cleaned out the loaders, including the application
//object. therefore, if the application object is null, we
//would log it and skip this step
_logger.log(Level.FINE,
"Application descriptor is NULL. setState skipped");
} else {
Switch.getSwitch().getManagementObjectManager().setApplicationState(
state, application,
configManager.getInstanceEnvironment().getName());
}
|
protected boolean | unload(boolean jsr77)Unloads this application.
// Possible values for unloading:
// 1. UNLOAD_ALL is for unloading regular application
// 2. UNLOAD_RAR is for unloading the rar part of the embedded rar
// 3. UNLOAD_REST is for unloading the rest part of the embedded rar
// Embedded rar is unloaded in two steps so we can delete connector
// resources in between.
//set default value
if (loadUnloadAction == Constants.LOAD_UNSET) {
loadUnloadAction = Constants.UNLOAD_ALL;
}
boolean wsUnloaded = false;
boolean ejbUnloaded = false;
boolean pusUnloaded = false;
if (loadUnloadAction == Constants.UNLOAD_ALL ||
loadUnloadAction == Constants.UNLOAD_REST) {
notifyAppEvent(ApplicationEvent.BEFORE_APPLICATION_UNLOAD);
wsUnloaded = unloadWebserviceEndpoints(jsr77);
// undeploy the ejb modules
ejbUnloaded = unloadEjbs(jsr77);
// Web modules are undeployed as part of the NSAPI reconfig
// callback interface implemented in J2EERunner
//undeploy persistence units
pusUnloaded = unloadPersistenceUnits();
if (loadUnloadAction == Constants.UNLOAD_REST) {
// return true status if components were unloaded OK
if (wsUnloaded && ejbUnloaded && pusUnloaded) {
return true;
} else {
return false;
}
}
}
// undeploy rar module
//START OF IASRI 4666595
boolean rarUnloaded = unloadRars(jsr77);
//END OF IASRI 4666595
configManager.unregisterDescriptor(id);
notifyAppEvent(ApplicationEvent.AFTER_APPLICATION_UNLOAD);
// helps garbage collection
done();
if (loadUnloadAction == Constants.UNLOAD_RAR) {
return rarUnloaded;
} else {
return (wsUnloaded && ejbUnloaded && pusUnloaded && rarUnloaded);
}
|