throws IOException, ServletException {
// Call the next filter if there is one
if (pos < n) {
ApplicationFilterConfig filterConfig = filters[pos++];
CometFilter filter = null;
try {
filter = (CometFilter) filterConfig.getFilter();
// FIXME: No instance listener processing for events for now
/*
support.fireInstanceEvent(InstanceEvent.BEFORE_FILTER_EVENT,
filter, event);
*/
if( Globals.IS_SECURITY_ENABLED ) {
final CometEvent ev = event;
Principal principal =
ev.getHttpServletRequest().getUserPrincipal();
Object[] args = new Object[]{ev, this};
SecurityUtil.doAsPrivilege("doFilterEvent", filter,
cometClassType, args, principal);
args = null;
} else {
filter.doFilterEvent(event, this);
}
/*support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
filter, event);*/
} catch (IOException e) {