/** * In the case of web archive, the super handles() method should be able * to make a unique identification. If not, then the archive is definitely * not a war. */ @Override protected boolean postHandles(ReadableArchive abstractArchive) throws IOException { return DeploymentUtils.isWebArchive(abstractArchive); }
/** * Returns true if the passed file or directory is recognized by this * instance. * * @param location the file or directory to explore * @param loader class loader for this application * @return true if this sniffer handles this application type */ public boolean handles(ReadableArchive location, ClassLoader loader) { return (DeploymentUtils.isWebArchive(location) || DeploymentUtils.isEAR(location) || isJar(location)); }
private void retrieveResourcesXMLFromArchive(Map<String, String> fileNames, ReadableArchive archive, String actualArchiveName) { if(DeploymentUtils.hasResourcesXML(archive)){ String archivePath = archive.getURI().getPath(); String fileName ; if(DeploymentUtils.isWebArchive(archive)){ fileName = archivePath + RESOURCES_XML_WEB_INF; }else{ fileName = archivePath + RESOURCES_XML_META_INF; } if(_logger.isLoggable(Level.FINEST)){ _logger.finest("GlassFish-Resources Deployer - fileName : " + fileName + " - parent : " + archive.getName()); } fileNames.put(actualArchiveName, fileName); } }
@Override protected boolean postHandles(ReadableArchive abstractArchive) throws IOException { AnnotationDetector detector = new AnnotationDetector(new EjbComponentAnnotationScanner()); return (!DeploymentUtils.isWebArchive(abstractArchive)) && detector.hasAnnotationInArchiveWithNoScanning(abstractArchive); } }
if(isWebArchive(archive)){ return archive.exists(RESOURCES_XML_WEB_INF); }else {
try { InputStream inputStream = null; if(DeploymentUtils.isWebArchive(ra)){ inputStream = ra.getEntry("WEB-INF/glassfish-services.xml"); }else{