params.name = archiveHandler.getDefaultApplicationName(archive, initialContext);
Applications apps = domain.getApplications();
ApplicationInfo appInfo = deployment.get(params.name);
ApplicationRef appRef = domain.getApplicationRefInServer(params.target, params.name);
if (appInfo != null) {
if (appRef!=null && appRef.getVirtualServers().contains(getName())) {
throw new ConfigException(
"Context with name "+params.name+" is already registered on virtual server "+getName());
} else {
String virtualServers = appRef.getVirtualServers();
virtualServers = virtualServers + ","+getName();
params.virtualservers = virtualServers;
params.force = Boolean.TRUE;
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "Virtual server "+getName()+" added to context "+params.name);