BundleResourceFinder resourceFinder = new BundleResourceFinder(packageAdmin, bundle, "META-INF/", ".tld");
resourceFinder.find(new ResourceFinderCallback() {
public void foundInDirectory(Bundle bundle, String basePath, URL url) throws Exception {
tldScanStream(url, new TldLocation(url.getPath()));
}
public void foundInJar(Bundle bundle, String jarName, ZipEntry entry, InputStream in) throws Exception {
URL jarURL = bundle.getEntry(jarName);
tldScanStream(in, new TldLocation(entry.getName(), jarURL.toExternalForm()));
}
});
bundle.getBundleContext().ungetService(reference);