{
// Try to initate clustering, fallback to standard if no clustering is
// available
try
{
AbstractJBossManager manager = null;
String managerClassName = config.getManagerClass();
Class managerClass = Thread.currentThread().getContextClassLoader().loadClass(managerClassName);
manager = (AbstractJBossManager)managerClass.newInstance();
String name = "//" + ((hostName == null) ? "localhost" : hostName) + ctxPath;
manager.init(name, metaData);
server.setAttribute(objectName, new Attribute("manager", manager));
log.debug("Enabled clustering support for ctxPath=" + ctxPath);
}