final HttpListenerRegistry registry = SystemInstance.get().getComponent(HttpListenerRegistry.class);
if (registry == null || mapping == null) {
return false;
}
final FilterListener listener;
try {
listener = new FilterListener((Filter) wc.newInstance(wc.getClassLoader().loadClass(classname)), wc.getContextRoot());
listener.getDelegate().init(config);
} catch (final Exception e) {
throw new OpenEJBRuntimeException(e);
}
registry.addHttpFilter(listener, pattern(wc.getContextRoot(), mapping));