org.apache.openejb.jee.Filter newFilter = new org.apache.openejb.jee.Filter();
webApp.getFilter().add(newFilter);
newFilter.setFilterName(filterName);
newFilter.setAsyncSupported(webFilter.asyncSupported());
if (!webFilter.description().isEmpty()) {
newFilter.addDescription(new Text(null, webFilter.description()));
}
if (!webFilter.displayName().isEmpty()) {
newFilter.addDisplayName(new Text(null, webFilter.displayName()));
}
newFilter.setFilterClass(cls.getName());
for (WebInitParam webInitParam : webFilter.initParams()) {
newFilter.getInitParam().add(newParamValue(webInitParam));
}