Package com.sun.enterprise.deployment.deploy.shared

Examples of com.sun.enterprise.deployment.deploy.shared.FileArchive.open()


                // construct the standard application.xml if omitted
                ApplicationArchivist appArchivist = new ApplicationArchivist();
            String dir = request.getDeployedDirectory().getAbsolutePath();
                FileArchive appArchive = new FileArchive();
                appArchive.open(dir);
                if (!appArchivist.hasStandardDeploymentDescriptor(appArchive)) {
                    Application appDesc =
                        Application.createApplication(appArchive,true,true);
                    request.setDescriptor(appDesc);
                }
View Full Code Here


    static Application getAppDescriptor(String appDir, boolean annotationProcessing)
            throws IASDeploymentException
    {
    try {
            FileArchive archive = new FileArchive();
            archive.open(appDir);

            ApplicationArchivist archivist = new ApplicationArchivist();
            archivist.setAnnotationProcessingRequested(annotationProcessing);
            archivist.setXMLValidation(false);
View Full Code Here

    static Application getModuleDescriptor(String appDir, boolean annotationProcessing)
            throws IASDeploymentException
    {
        try {
            FileArchive archive = new FileArchive();
            archive.open(appDir);

            Archivist archivist =
                ArchivistFactory.getArchivistForArchive(archive);

            archivist.setAnnotationProcessingRequested(annotationProcessing);
View Full Code Here

            // if is system predeployed app, load from original app dir
            // else load from generated/xml dir
            // print a warning if generated/xml dir is not there
            // and load from original dir (upgrade scenario)
            if (manager.isSystemAdmin(appId)) {
                in.open(appDir);
            } else {
                String xmlDir = manager.getGeneratedXMLLocation(appId);
                if (FileUtils.safeIsDirectory(xmlDir)) {
                    /*
                     * If default-web.xml is more recent than the generated
View Full Code Here

                     */
                    File xmlDirFile = new File(xmlDir);
                    if (xmlDirFile.lastModified() < DOLLoadingContext.defaultWebXMLLastModified()) {
                        _logger.log(Level.INFO, "enterprise.deployment.backend.default_web_xml_more_recent",
                                new Object[] {appId, appDir});
                        in.open(appDir);
                    } else {
                        in.open(xmlDir);
                    }
                } else {
                    // log a warning message in the server log
View Full Code Here

                    if (xmlDirFile.lastModified() < DOLLoadingContext.defaultWebXMLLastModified()) {
                        _logger.log(Level.INFO, "enterprise.deployment.backend.default_web_xml_more_recent",
                                new Object[] {appId, appDir});
                        in.open(appDir);
                    } else {
                        in.open(xmlDir);
                    }
                } else {
                    // log a warning message in the server log
                    _logger.log(Level.WARNING,
                        "enterprise.deployment.backend.no_generated_xmldir",
View Full Code Here

                } else {
                    // log a warning message in the server log
                    _logger.log(Level.WARNING,
                        "enterprise.deployment.backend.no_generated_xmldir",
                        new Object[]{appId, xmlDir, appDir});
                    in.open(appDir);
                }
            }

            Archivist archivist = null;
            if (manager instanceof AppsManager) {
View Full Code Here

    }
   
    protected AbstractArchive expand(File file)
        throws IOException, Exception {
        FileArchive appArchive = new FileArchive();
        appArchive.open(file.getAbsolutePath());
        return appArchive;
    }

    protected boolean deleteAppClientDir() {
        return false;
View Full Code Here

            String appName = rarName.substring(0, rarName.indexOf(ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER));
            String actualRarName = rarName.substring(rarName.indexOf(ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER) + 1);
            String appDeployLocation = ResourcesUtil.createInstance().getApplicationDeployLocation(appName);
           
            FileArchive in = new FileArchive();
            in.open(appDeployLocation);
            ApplicationArchivist archivist = new ApplicationArchivist();
            Application application = (Application) archivist.open(in);
            //get all RAR descriptors and try searching for this embedded RAR
            Set s = application.getRarDescriptors();
            for (Iterator iter = s.iterator(); iter.hasNext();) {
View Full Code Here

                    try{
//                        if (f==null){
                            String uri = getAbstractArchiveUri(descriptor);
                            try {
                                FileArchive arch = new FileArchive();
                                arch.open(uri);
                                deploymentEntry = arch.getEntry(value);
                            }catch (Exception e) { }
//                        }else{
//                            try{
//                            jarFile = new JarFile(f);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.