final String cbName = callback.getClass().getName();
if (cbName.equals(tldConfig.getDeclaringClass().getName())) {
ensureServerTldsScanned();
try {
final TldConfig config;
try {
config = (TldConfig) tldConfig.get(callback);
} catch (final IllegalAccessException e) {
throw new OpenEJBException("scan with default algo");
}
final Set<URL> urls = TldScanner.scan(classLoader != null ? classLoader : context.getClassLoader());
for (final URL url : urls) {
if (!SERVER_URLS.contains(url)) {
tldConfig(config, url);
}
}
// add already scanned ones
for (final String uri : TAG_LIB_URIS) {
config.addTaglibUri(uri);
}
for (final String listener : LISTENERS) {
if (!"org.apache.myfaces.webapp.StartupServletContextListener".equals(listener)) { // done elsewhere
config.addApplicationListener(listener);
}
}
} catch (final OpenEJBException oe) {
log.error(oe.getMessage(), oe);
}