}
/** Start callback. */
public void start() throws Exception {
// Initialization of services
Filter lastFilter = null;
// Checking if all applications have proper connectors
boolean success = checkVirtualHost(getComponent().getDefaultHost());
if (success) {
for (VirtualHost host : getComponent().getHosts()) {
success = success && checkVirtualHost(host);
}
}
// Let's actually start the component
if (!success) {
getComponent().stop();
} else {
// Logging of calls
if (getComponent().getLogService().isEnabled()) {
lastFilter = createLogFilter(getComponent().getContext(),
getComponent().getLogService());
setFirst(lastFilter);
}
// Addition of status pages
if (getComponent().getStatusService().isEnabled()) {
Filter statusFilter = createStatusFilter(getComponent());
if (lastFilter != null)
lastFilter.setNext(statusFilter);
if (getFirst() == null)
setFirst(statusFilter);
lastFilter = statusFilter;