/** * Adds candidate persistence archives from the EAR's library directory * and, if selected, from the top-level. * @param earArchive ReadableArchive for the EAR * @param app application's descriptor * @param includeTopLevel whether or not to include top-level JARs for scanning * @param probablePersistentArchives map to which new candidates will be added */ protected static void addLibraryAndTopLevelCandidates(final ReadableArchive earArchive, final Application app, final boolean includeTopLevel, final Map<String,ReadableArchive> probablePersistentArchives) { //Get probable archives from root of the ear if (includeTopLevel) { SubArchivePURootScanner earRootScanner = new EARTopLevelJARPURootScanner(app); probablePersistentArchives.putAll( PersistenceArchivist.getProbablePersistenceRoots(earArchive, earRootScanner)); } //Geather all jars in lib of ear SubArchivePURootScanner libPURootScannerScanner = new EARLibraryPURootScanner(app); probablePersistentArchives.putAll( PersistenceArchivist.getProbablePersistenceRoots(earArchive, libPURootScannerScanner)); }
/** * Adds candidate persistence archives from the EAR's library directory * and, if selected, from the top-level. * @param earArchive ReadableArchive for the EAR * @param app application's descriptor * @param includeTopLevel whether or not to include top-level JARs for scanning * @param probablePersistentArchives map to which new candidates will be added */ protected static void addLibraryAndTopLevelCandidates(final ReadableArchive earArchive, final Application app, final boolean includeTopLevel, final Map<String,ReadableArchive> probablePersistentArchives) { //Get probable archives from root of the ear if (includeTopLevel) { SubArchivePURootScanner earRootScanner = new EARTopLevelJARPURootScanner(app); probablePersistentArchives.putAll( PersistenceArchivist.getProbablePersistenceRoots(earArchive, earRootScanner)); } //Geather all jars in lib of ear SubArchivePURootScanner libPURootScannerScanner = new EARLibraryPURootScanner(app); probablePersistentArchives.putAll( PersistenceArchivist.getProbablePersistenceRoots(earArchive, libPURootScannerScanner)); }