param.getVirtualServer().add(newVirtualServer);
return newVirtualServer;
}
}, httpService);
} catch (Exception ex) {
throw new GlassFishException(ex);
}
if ((webListeners != null) && (!webListeners.isEmpty())) {
for (WebListener listener : webListeners) {
if (getWebListener(listener.getId())==null) {
addWebListener(listener, virtualServer.getID());
}
}
}
vs = (com.sun.enterprise.web.VirtualServer) engine.findChild(id);
if (vs != null) {
if (log.isLoggable(Level.INFO)) {
log.info("Added virtual server " + id +
" docroot " + docRoot + " networklisteners " + nl);
}
if (virtualServer instanceof VirtualServerFacade) {
((VirtualServerFacade)virtualServer).setVirtualServer(vs);
}
vs.setNetworkListenerNames(names.toArray(new String[names.size()]));
} else {
log.severe("Could not add virtual server "+id);
throw new GlassFishException(
new Exception("Cannot add virtual server " + id));
}
}