Methods Summary |
---|
private boolean | standAlone(J2EEDeployedObjectMdl modObject)
try {
ObjectName objName = new ObjectName(modObject.getobjectName());
String appName = objName.getKeyProperty("J2EEApplication");
if ((appName == null) || (appName.length() < 1) ||
(appName.equals("null")) || (appName.equals("NULL")) ||
(appName.equals(""))) {
return true;
}
} catch (Exception e) {
throw new MBeanException(e);
}
return false;
|
private void | startApplication(java.lang.String appID, java.lang.String serverName)
try {
ManagedJ2EEApplication mApp = new ManagedJ2EEApplication(serverName,
appID);
mApp.start();
} catch (Exception e) {
throw new MBeanException(e);
}
|
private void | startEJBModule(java.lang.String moduleID, java.lang.String serverName)
try {
ManagedStandaloneJ2EEEjbJarModule msejbModule = new ManagedStandaloneJ2EEEjbJarModule(serverName,
moduleID);
msejbModule.start();
} catch (Exception e) {
throw new MBeanException(e);
}
|
public void | startModule(J2EEDeployedObjectMdl modObject)Invokes appropriate start method based on j2ee type.
If trying to start a module which is part of an application
then it will throw exception.
if (debug) {
return;
}
String moduleID = modObject.getname();
String j2eeType = modObject.getj2eeType();
String serverName = modObject.getJ2EEServer();
// check if trying to start a module which is part of the application
if ((!j2eeType.equals(ManagementObjectManager.J2EE_TYPE_APPLICATION)) &&
(!standAlone(modObject))) {
throw new MBeanException(
new Exception(
"cannot start individual module, start the application itself"));
}
if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_EJB_MODULE)) {
startEJBModule(moduleID, serverName);
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_WEB_MODULE)) {
startWEBModule(moduleID, serverName);
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_RAR_MODULE)) {
startRARModule(moduleID, serverName);
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_ACC_MODULE)) {
return;
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_APPLICATION)) {
startApplication(moduleID, serverName);
}
|
private void | startRARModule(java.lang.String moduleID, java.lang.String serverName)
try {
ManagedStandaloneConnectorModule mscModule = new ManagedStandaloneConnectorModule(serverName,
moduleID);
mscModule.start();
} catch (Exception e) {
throw new MBeanException(e);
}
|
private void | startWEBModule(java.lang.String moduleID, java.lang.String serverName)
try {
ManagedStandaloneJ2EEWebModule mswebModule = new ManagedStandaloneJ2EEWebModule(serverName,
moduleID);
mswebModule.start();
} catch (Exception e) {
throw new MBeanException(e);
}
|
private void | stopApplication(java.lang.String appID, java.lang.String serverName)
try {
ManagedJ2EEApplication mApp = new ManagedJ2EEApplication(serverName,
appID);
mApp.stop();
} catch (Exception e) {
throw new MBeanException(e);
}
|
private void | stopEJBModule(java.lang.String moduleID, java.lang.String serverName)
try {
ManagedStandaloneJ2EEEjbJarModule msejbModule = new ManagedStandaloneJ2EEEjbJarModule(serverName,
moduleID);
msejbModule.stop();
} catch (Exception e) {
throw new MBeanException(e);
}
|
public void | stopModule(J2EEDeployedObjectMdl modObject)Invokes appropriate stop method based on j2ee type.
If trying to stop a module which is part of an application
then it will throw exception.
if (debug) {
return;
}
String moduleID = modObject.getname();
String j2eeType = modObject.getj2eeType();
String serverName = modObject.getJ2EEServer();
// check if trying to stop a module which is part of the application
if ((!j2eeType.equals(ManagementObjectManager.J2EE_TYPE_APPLICATION)) &&
(!standAlone(modObject))) {
throw new MBeanException(
new Exception(
"cannot stop individual module, stop the application itself"));
}
if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_EJB_MODULE)) {
stopEJBModule(moduleID, serverName);
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_WEB_MODULE)) {
stopWEBModule(moduleID, serverName);
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_RAR_MODULE)) {
stopRARModule(moduleID, serverName);
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_ACC_MODULE)) {
return;
} else if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_APPLICATION)) {
stopApplication(moduleID, serverName);
}
|
private void | stopRARModule(java.lang.String moduleID, java.lang.String serverName)
try {
ManagedStandaloneConnectorModule mscModule = new ManagedStandaloneConnectorModule(serverName,
moduleID);
mscModule.stop();
} catch (Exception e) {
throw new MBeanException(e);
}
|
private void | stopWEBModule(java.lang.String moduleID, java.lang.String serverName)
try {
ManagedStandaloneJ2EEWebModule mswebModule = new ManagedStandaloneJ2EEWebModule(serverName,
moduleID);
mswebModule.stop();
} catch (Exception e) {
throw new MBeanException(e);
}
|