try {
manifest = new Manifest(new URL(urlpath).openStream());
} catch (Exception ex) {
throw new ModuleException("Cannot load plugin manifest: " + urlpath, ex);
}
Dictionary<String, String> headers = new ManifestHeadersProvider(manifest).getHeaders();
String symbolicName = headers.get(Constants.BUNDLE_SYMBOLICNAME);
String version = headers.get(Constants.BUNDLE_VERSION);
headers.put(org.jboss.gravia.Constants.GRAVIA_IDENTITY_CAPABILITY, symbolicName + ";version=" + version);
headers.put(org.jboss.gravia.Constants.MODULE_ACTIVATOR, getClass().getName());
return runtime.installModule(classLoader, headers);