throw new RuntimeException("Could not add hibernate 3 integration module to deployment, did not get expected JarUrlConnection, got " + connection);
}
final JarFile jarFile = ((JarURLConnection) connection).getJarFile();
moduleSpecification.addResourceLoader(ResourceLoaderSpec.createResourceLoaderSpec(ResourceLoaders.createJarResourceLoader("hibernate3integration", jarFile)));
// hack in the dependencies which are part of hibernate3integration
// TODO: do this automatically (adding dependencies found in HIBERNATE_3_PROVIDER).
addDependency(moduleSpecification, moduleLoader, JBOSS_AS_NAMING_ID);
addDependency(moduleSpecification, moduleLoader, JBOSS_JANDEX_ID);