private WebModule createWebModule(final String jar, final URL warUrl, final ClassLoader parentClassLoader, final String contextRoot, final String moduleName, final ExternalConfiguration config) throws OpenEJBException { return createWebModule(jar, URLs.toFilePath(warUrl), parentClassLoader, contextRoot, moduleName, config); }
private WebModule createWebModule(final String jar, final URL warUrl, final ClassLoader parentClassLoader, final String contextRoot, final String moduleName, final ExternalConfiguration config) throws OpenEJBException { return createWebModule(jar, URLs.toFilePath(warUrl), parentClassLoader, contextRoot, moduleName, config); }
private boolean isIn(final PersistenceUnit value, final WebModule war) { final Collection<URL> urls = (Collection<URL>) war.getAltDDs().get(DeploymentLoader.EAR_WEBAPP_PERSISTENCE_XML_JARS); if (urls == null || urls.isEmpty()) { return false; } final Collection<String> strUrls = new ArrayList<String>(); for (final URL url : urls) { strUrls.add(URLs.toFilePath(url)); } for (final PersistenceModule persistenceModule : module.getPersistenceModules()) { final Persistence persistence = persistenceModule.getPersistence(); final String rootUrl; try { rootUrl = URLs.toFilePath(new URL(persistenceModule.getRootUrl())); } catch (final MalformedURLException e) { continue; } for (final PersistenceUnit unit : persistence.getPersistenceUnit()) { if (unit == value) { if (strUrls.contains(rootUrl)) { return true; } } } } return false; }
private boolean isIn(final PersistenceUnit value, final WebModule war) { final Collection<URL> urls = (Collection<URL>) war.getAltDDs().get(DeploymentLoader.EAR_WEBAPP_PERSISTENCE_XML_JARS); if (urls == null || urls.isEmpty()) { return false; } final Collection<String> strUrls = new ArrayList<String>(); for (final URL url : urls) { strUrls.add(URLs.toFilePath(url)); } for (final PersistenceModule persistenceModule : module.getPersistenceModules()) { final Persistence persistence = persistenceModule.getPersistence(); final String rootUrl; try { rootUrl = URLs.toFilePath(new URL(persistenceModule.getRootUrl())); } catch (final MalformedURLException e) { continue; } for (final PersistenceUnit unit : persistence.getPersistenceUnit()) { if (unit == value) { if (strUrls.contains(rootUrl)) { return true; } } } } return false; }
public void addWebModule(final AppModule appModule, final URL warUrl, final ClassLoader parentClassLoader, final String contextRoot, final String moduleName) throws OpenEJBException { final WebModule webModule = createWebModule(appModule.getJarLocation(), URLs.toFilePath(warUrl), parentClassLoader, contextRoot, moduleName, null); addWebModule(webModule, appModule); }
public void addWebModule(final AppModule appModule, final URL warUrl, final ClassLoader parentClassLoader, final String contextRoot, final String moduleName) throws OpenEJBException { final WebModule webModule = createWebModule(appModule.getJarLocation(), URLs.toFilePath(warUrl), parentClassLoader, contextRoot, moduleName, null); addWebModule(webModule, appModule); }
connectorModule.getWatchedResources().add(rarFile.getAbsolutePath()); if (rarXmlUrl != null && "file".equals(rarXmlUrl.getProtocol())) { connectorModule.getWatchedResources().add(URLs.toFilePath(rarXmlUrl));
connectorModule.getWatchedResources().add(rarFile.getAbsolutePath()); if (rarXmlUrl != null && "file".equals(rarXmlUrl.getProtocol())) { connectorModule.getWatchedResources().add(URLs.toFilePath(rarXmlUrl));
clientModule.getWatchedResources().add(absolutePath); if (clientXmlUrl != null && "file".equals(clientXmlUrl.getProtocol())) { clientModule.getWatchedResources().add(URLs.toFilePath(clientXmlUrl));
connectorModule.getWatchedResources().add(rarFile.getAbsolutePath()); if (rarXmlUrl != null && "file".equals(rarXmlUrl.getProtocol())) { connectorModule.getWatchedResources().add(URLs.toFilePath(rarXmlUrl));
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; }
webModule.getTaglibs().add(taglib); if ("file".equals(location.getProtocol())) { webModule.getWatchedResources().add(URLs.toFilePath(location));
clientModule.getWatchedResources().add(URLs.toFilePath(clientXmlUrl));
clientModule.getWatchedResources().add(URLs.toFilePath(clientXmlUrl));
webModule.getTaglibs().add(taglib); if ("file".equals(location.getProtocol())) { webModule.getWatchedResources().add(URLs.toFilePath(location));
webModule.getTaglibs().add(taglib); if ("file".equals(location.getProtocol())) { webModule.getWatchedResources().add(URLs.toFilePath(location));
ejbModule.getWatchedResources().add(URLs.toFilePath(ejbJarXmlUrl));
ejbModule.getWatchedResources().add(URLs.toFilePath(ejbJarXmlUrl));
persistenceModule.getWatchedResources().add(moduleName); if ("file".equals(persistenceUrl.getProtocol())) { persistenceModule.getWatchedResources().add(toFilePath(persistenceUrl));
webModule.getWatchedResources().add(warFile.getAbsolutePath()); if (webXmlUrl != null && "file".equals(webXmlUrl.getProtocol())) { webModule.getWatchedResources().add(URLs.toFilePath(webXmlUrl));