boolean isProbablePuRootJar(String jarName) { // all jars in root of subarchive are probable pu roots boolean probablePuRootJar = PersistenceArchivist.isProbablePuRootJar(jarName); if(!probablePuRootJar && isJarEntry(jarName) ) { // A jar that is not in root of archive. Log that it will not be scanned if (deplLogger.isLoggable(Level.FINE)) { deplLogger.logp(Level.FINE, "PersistenceArchivist", "readPersistenceDeploymentDescriptors", "skipping {0} as it exists inside a directory in {1}.", new Object[]{jarName, getPathOfSubArchiveToScan()}); } } return probablePuRootJar; } }
boolean isProbablePuRootJar(String jarName) { // all jars in root of subarchive are probable pu roots boolean probablePuRootJar = PersistenceArchivist.isProbablePuRootJar(jarName); if(!probablePuRootJar && isJarEntry(jarName) ) { // A jar that is not in root of archive. Log that it will not be scanned if (st_logger.isLoggable(Level.FINE)) { st_logger.logp(Level.FINE, "PersistenceArchivist", "readPersistenceDeploymentDescriptors", "skipping {0} as it exists inside a directory in {1}.", new Object[]{jarName, getPathOfSubArchiveToScan()}); } } return probablePuRootJar; } }
private boolean scanForPURRootsInEarRoot(DeploymentContext ctx, Set<ModuleDescriptor<BundleDescriptor>> modules) { boolean puPresentInEarRoot = false; Enumeration<String> entriesInEar = ctx.getSource().entries(); while(entriesInEar.hasMoreElements() && !puPresentInEarRoot) { String entry = entriesInEar.nextElement(); puPresentInEarRoot = PersistenceArchivist.isProbablePuRootJar(entry) && !EARBasedPersistenceHelper.isComponentJar(entry, modules); } return puPresentInEarRoot; } }