private Map<String, Bundle> scanGlobalTlds(Bundle bundle) throws DeploymentException {
BundleContext bundleContext = bundle.getBundleContext();
ServiceReference reference = bundleContext.getServiceReference(TldRegistry.class.getName());
Map<String, Bundle> tldLocationBundleMap = new HashMap<String, Bundle>();
if (reference != null) {
TldRegistry tldRegistry = (TldRegistry) bundleContext.getService(reference);
for (TldProvider.TldEntry entry : tldRegistry.getDependentTlds(bundle)) {
URL url = entry.getURL();
tldLocationBundleMap.put(url.toString(), entry.getBundle());
}
bundleContext.ungetService(reference);
}