* Enables monitoring of all virtual servers.
*/
private void enableVirtualServerMonitoring(VirtualServer vs){
ServerContext sc = getServerContext();
ConfigContext cc = sc.getConfigContext();
MonitoringRegistry monitoringRegistry = sc.getMonitoringRegistry();
PWCVirtualServerStatsImpl vsStats = new PWCVirtualServerStatsImpl(vs);
try {
monitoringRegistry.registerPWCVirtualServerStats(vsStats,
vs.getID(),
null);
} catch (Exception e) {
_logger.log(Level.WARNING,
"Unable to register PWCVirtualServerStats for "
+ vs.getID(), e);
}
PWCRequestStatsImpl pwcRequestStatsImpl =
new PWCRequestStatsImpl(sc.getDefaultDomainName());
vs.setPWCRequestStatsImpl(pwcRequestStatsImpl);
try {
monitoringRegistry.registerPWCRequestStats(pwcRequestStatsImpl,
vs.getID(),
null);
} catch (MonitoringRegistrationException mre) {
String msg = _logger.getResourceBundle().getString(
"web.monitoringRegistrationError");