Methods Summary |
---|
static void | enableWebCoreReconfig()
findReconfigMethod();
if (reconfigMethod != null) {
reconfigEnabled = true;
}
|
private static void | findReconfigMethod()
j2eeRunnerClass = Class.forName(J2EE_RUNNER_CLASS);
reconfigMethod = j2eeRunnerClass.getMethod(RECONFIG_METHOD, (Class[])null);
|
private static java.lang.String[] | getReconfigCommand(java.lang.String instance)
String pfx = AdminChannel.instanceRoot + File.separator + instance
+ File.separator;
if (OS.isUnix()) {
return new String[]{pfx + "reconfig"};
} else if (OS.isWindows()) {
return new String[]{pfx + "reconfig.bat"};
} else {
return null;
}
|
private static int | reconfig(java.lang.String instanceName)
int retval = 0;
String[] cmd = getReconfigCommand(instanceName);
if (cmd != null) {
ProcessExecutor pe = new ProcessExecutor(cmd);
try {
pe.execute();
} catch (ExecException ee) {
AdminChannel.debug(ee);
retval = 1;
}
}
return retval;
|
public static void | sendReconfigMessage(java.lang.String instanceName)Send reconfigure message to specified instance
/*
int ret = reconfig(instanceName);
if (ret != 0) {
AdminChannel.warn(RECONFIG_ERROR);
}
*/
if (reconfigEnabled) {
try {
reconfigMethod.invoke( null, (Object[])null);
} catch (IllegalAccessException access) {
AdminChannel.warn(RECONFIG_ERROR);
AdminChannel.debug(access);
} catch (IllegalArgumentException arg) {
AdminChannel.warn(RECONFIG_ERROR);
AdminChannel.debug(arg);
} catch (InvocationTargetException ite) {
AdminChannel.warn(RECONFIG_ERROR);
AdminChannel.debug(ite.getTargetException());
AdminChannel.debug(ite);
}
}
|