if (System.getProperty("com.sun.enterprise.web.useWebcore") != null){
useWebcore = Boolean.parseBoolean(
System.getProperty("com.sun.enterprise.web.useWebcore"));
}
VirtualServer vs = null;
if ( useWebcore ) {
/*
* Ideally, this would be as simple as:
*
* return new com.sun.enterprise.web.HttpServiceVirtualServer();
*
* but importing this class would cause a circular dependency
* between appserv-core-ee and appserv-pwc-linkage
*/
try {
vs = (VirtualServer) Class.forName("com.sun.enterprise.web.HttpServiceVirtualServer").newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
} else {
vs = new VirtualServer();
}
return vs;
}