private static Map<String, URL> getDescriptors(final ResourceFinder finder) throws OpenEJBException { return getDescriptors(finder, true); }
private static Map<String, URL> getDescriptors(final ResourceFinder finder) throws OpenEJBException { return getDescriptors(finder, true); }
private static Map<String, URL> getDescriptors(ResourceFinder finder) throws OpenEJBException { return getDescriptors(finder, true); }
public static Map<String, URL> getDescriptors(final URL moduleUrl) throws OpenEJBException { final ResourceFinder finder = new ResourceFinder(moduleUrl); return getDescriptors(finder); }
public static Map<String, URL> getDescriptors(final URL moduleUrl) throws OpenEJBException { final ResourceFinder finder = new ResourceFinder(moduleUrl); return getDescriptors(finder); }
private static Map<String, URL> getDescriptors(URL moduleUrl) throws OpenEJBException { ResourceFinder finder = new ResourceFinder(moduleUrl); return getDescriptors(finder); }
@SuppressWarnings({"unchecked"}) protected static void addPersistenceUnits(AppModule appModule, URL... urls) throws OpenEJBException { // OPENEJB-1059: Anything in the appModule.getAltDDs() map has already been // processed by the altdd code, so anything in here should not cause OPENEJB-1059 List<URL> persistenceUrls = (List<URL>) appModule.getAltDDs().get("persistence.xml"); if (persistenceUrls == null) { persistenceUrls = new ArrayList<URL>(); appModule.getAltDDs().put("persistence.xml", persistenceUrls); } for (URL url : urls) { // OPENEJB-1059: looking for an altdd persistence.xml file in all urls // delegates to xbean finder for going throughout the list ResourceFinder finder = new ResourceFinder("", appModule.getClassLoader(), url); Map<String, URL> descriptors = getDescriptors(finder, false); // if a persistence.xml has been found, just pull it to the list if (descriptors.containsKey("persistence.xml")) { URL descriptor = descriptors.get("persistence.xml"); // don't add it if already present if (persistenceUrls.contains(descriptor)) continue; // log if it is an altdd String urlString = descriptor.toExternalForm(); if (!urlString.contains("META-INF/persistence.xml")) { logger.info("AltDD persistence.xml -> " + urlString); } persistenceUrls.add(descriptor); } } }
final Map<String, URL> descriptors = getDescriptors(finder, false);
final Map<String, URL> descriptors = getDescriptors(finder, false);
public static void addWebModuleDescriptors(final URL baseUrl, final WebModule webModule, final AppModule appModule) throws OpenEJBException { final Map<String, Object> otherDD = new HashMap<String, Object>(); final List<URL> urls = webModule.getScannableUrls(); final ResourceFinder finder = new ResourceFinder("", urls.toArray(new URL[urls.size()])); otherDD.putAll(getDescriptors(finder, false)); // "persistence.xml" is done separately since we manage a list of url and not s single url try { final List<URL> persistenceXmls = finder.findAll(ddDir + "persistence.xml"); if (persistenceXmls.size() >= 1) { final URL old = (URL) otherDD.get("persistence.xml"); if (old != null && !persistenceXmls.contains(old)) { persistenceXmls.add(old); } otherDD.put("persistence.xml", persistenceXmls); } } catch (final IOException e) { // ignored } addConnectorModules(appModule, webModule); addWebPersistenceDD("persistence.xml", otherDD, appModule); addWebPersistenceDD("persistence-fragment.xml", otherDD, appModule); addPersistenceUnits(appModule, baseUrl); addWebFragments(webModule, urls); }
final Map<String, URL> descriptors = getDescriptors(finder, false); final Map<String, URL> descriptors = getDescriptors(finder, false);
Map<String, URL> descriptors = getDescriptors(baseUrl); Connector connector = null; URL rarXmlUrl = descriptors.get("ra.xml");
final Map<String, URL> descriptors = getDescriptors(baseUrl); Connector connector = null; URL rarXmlUrl = descriptors.get("ra.xml");
final Map<String, URL> descriptors = getDescriptors(baseUrl); Connector connector = null; URL rarXmlUrl = descriptors.get("ra.xml");
descriptors = getDescriptors(baseUrl); } else { try { descriptors = getDescriptors(classLoader, null); } catch (final IOException e) { descriptors = new HashMap<>();
protected static EjbModule createEjbModule(URL baseUrl, String jarPath, ClassLoader classLoader, String moduleId) throws OpenEJBException { // read the ejb-jar.xml file Map<String, URL> descriptors = getDescriptors(baseUrl); EjbJar ejbJar = null; URL ejbJarXmlUrl = descriptors.get("ejb-jar.xml"); if (ejbJarXmlUrl != null){ ejbJar = ReadDescriptors.readEjbJar(ejbJarXmlUrl); } // create the EJB Module EjbModule ejbModule = new EjbModule(classLoader, moduleId, jarPath, ejbJar, null); ejbModule.getAltDDs().putAll(descriptors); ejbModule.getWatchedResources().add(jarPath); if (ejbJarXmlUrl != null && "file".equals(ejbJarXmlUrl.getProtocol())) { ejbModule.getWatchedResources().add(URLs.toFilePath(ejbJarXmlUrl)); } ejbModule.setClientModule(createClientModule(baseUrl, jarPath, classLoader, null, false)); // load webservices descriptor addWebservices(ejbModule); return ejbModule; }
descriptors = getDescriptors(baseUrl); } else { try { descriptors = getDescriptors(classLoader, null); } catch (final IOException e) { descriptors = new HashMap<String, URL>();
Map<String, URL> descriptors = getDescriptors(clientFinder, log);
final Map<String, URL> descriptors = getDescriptors(clientFinder, log);
final Map<String, URL> descriptors = getDescriptors(clientFinder, log);