/** * Build the J2EEApplication name. * @param pUrl The URL of Ear file * @return The J2EEApplication name */ public static String fromURL(URL pUrl) { String sName = null; try { sName = new File(pUrl.getFile()).getName(); if ("file".equals(pUrl.getProtocol())) { sName = fromFileName(sName); } } catch (NullPointerException e) { logger.log(BasicLevel.DEBUG, "Can't build j2ee application", e); } return sName; }
contctx = new ComponentContext(earRootUrl.getFile()); contctx.rebind(WebServicesService.CLASSLOADER_CTX_PARAM, earClassLoader); ObjectName name = J2eeObjectName.J2EEApplication(getDomainName(), getJonasServerName(), ModuleNamingUtils.fromURL(earUrl[0])); contctx.rebind(WebServicesService.PARENT_OBJECTNAME_CTX_PARAM , name); contctx.rebind(WebServicesService.ISINEAR_CTX_PARAM, Boolean.TRUE); String j2eeApplicationName = ModuleNamingUtils.fromURL(earUrl[0]); for (int i = 0; i < clientUrls.length; i++) { URL clientUrl = clientUrls[i]; String moduleName = ModuleNamingUtils.fromURL(clientUrl); String moduleFileName = clientUrl.getPath(); String moduleDD = null;
j2eeAppName = ModuleNamingUtils.fromFileName(earFileName);
/** * Remove a JOnAS container */ public void removeContainer(Container cont) { if (servlog.isLoggable(BasicLevel.DEBUG)) { servlog.log(BasicLevel.DEBUG, cont.getName()); } // Admin code String domainName = getDomainName(); String serverName = getJonasServerName(); String earFileName = cont.getEarFileName(); String earName = null; if (earFileName != null) { earName = ModuleNamingUtils.fromFileName(earFileName); } String moduleName = cont.getName(); unregisterCompMBeans(domainName, serverName, earName, moduleName); // Remove container cont.remove(); containers.removeElement(cont); // Run the garbage collector Runtime.getRuntime().gc(); }
ModuleNamingUtils.fromFileName(resultFilename), ModuleNamingUtils.fromFileName(fileName)).getCanonicalName(); String cname = ModuleNamingUtils.fromFileName(fileName); if (cname == null) { String j2eeappName = ModuleNamingUtils.fromFileName(earFileName); String ejbModuleON = registerCompMBeans(domainName, serverName, j2eeappName, cname, cont, fileName, earUrl, dd, factoryMap, beanDescMap);