} else {
String clusterClassName = WebAppConfiguration.stringArg(args, "clusterClassName",
CLUSTER_CLASS).trim();
try {
Class clusterClass = Class.forName(clusterClassName);
Constructor clusterConstructor = clusterClass
.getConstructor(new Class[] { Map.class, Integer.class });
this.cluster = (Cluster) clusterConstructor
.newInstance(new Object[] { args, new Integer(this.controlPort) });
} catch (ClassNotFoundException err) {
Logger.log(Logger.DEBUG, RESOURCES, "Launcher.ClusterNotFound");
} catch (Throwable err) {
Logger.log(Logger.WARNING, RESOURCES, "Launcher.ClusterStartupError", err);
}
}
}
// If jndi is enabled, run the container wide jndi populator
if (useJNDI) {
String jndiMgrClassName = WebAppConfiguration.stringArg(args, "containerJndiClassName",
DEFAULT_JNDI_MGR_CLASS).trim();
try {
// Build the realm
Class jndiMgrClass = Class.forName(jndiMgrClassName, true, commonLibCL);
Constructor jndiMgrConstr = jndiMgrClass.getConstructor(new Class[] {
Map.class, List.class, ClassLoader.class });
this.globalJndiManager = (JNDIManager) jndiMgrConstr.newInstance(new Object[] {
args, null, commonLibCL });
this.globalJndiManager.setup();
} catch (ClassNotFoundException err) {
Logger.log(Logger.DEBUG, RESOURCES,
"Launcher.JNDIDisabled");