Package com.sun.enterprise.deployment.archivist

Examples of com.sun.enterprise.deployment.archivist.AppClientArchivist


        if (application!=null) {
            application.setClassLoader(cl);
            return application;
        }            
   try {
       AppClientArchivist appClientArchivist = new AppClientArchivist();
       appClientArchivist.setXMLValidation(validateXml);
             appClientArchivist.setClassLoader(cl);
      
       FileArchive archive = openDDArchive(modId, modDir);
            
             // Try to load the app from the serialized descriptor file.
             SerializedDescriptorHelper.Loader sdLoader =
View Full Code Here


                            || (directory &&
                                (name.endsWith("_jar") ||
                                 name.endsWith(".jar"))) ) {
                    try {
                        //Section EE.8.4.2.1.d.i
                        AppClientArchivist acArchivist = new AppClientArchivist();
                        if (acArchivist.hasStandardDeploymentDescriptor(subArchive)
                            || acArchivist.hasRuntimeDeploymentDescriptor(subArchive)
                            || acArchivist.getMainClassName(subArchive.getManifest()) != null) {

                            ModuleDescriptor md = new ModuleDescriptor();
                            md.setArchiveUri(uri);
                            md.setModuleType(ModuleType.CAR);
                            md.setManifest(subArchive.getManifest());
View Full Code Here

        PluggableArchivistsHelper defaultArchivists = new PluggableArchivistsHelper();
        defaultArchivists.registerArchivist(new ApplicationArchivist());
        defaultArchivists.registerArchivist(new WebArchivist());
        defaultArchivists.registerArchivist(new EjbArchivist());
        defaultArchivists.registerArchivist(new ConnectorArchivist());
        defaultArchivists.registerArchivist(new AppClientArchivist());
        AbstractArchive abstractArchive =
                new FileArchiveFactory().openArchive(
                        frameworkContext.getExplodedArchivePath());
        frameworkContext.setAbstractArchive(abstractArchive);
        archivist.setPluggableArchivists(defaultArchivists);
View Full Code Here

                // reads std & iAS application xml

                try {
                    // Set classloader before opening archive to enable
                    // validation.
                    AppClientArchivist arch = new AppClientArchivist();
                    arch.setAnnotationProcessingRequested(true);
                    arch.setClassLoader(jcl);

                    // for class case, get default bundle
                    if (className!=null) {
                        appDesc = (ApplicationClientDescriptor) arch.getDefaultBundleDescriptor();
                    } else {
                        // for client jar case, do not process annotations.
                        // use AppClientArchivist.open(String) instead of
                        // AppClientArchivist.open(AbstractArchive) since the
                        // open(String) method calls validate.
                        appDesc = (ApplicationClientDescriptor) arch.open(appClientFile.getAbsolutePath());
                    }

                    if (className!=null) {
                        // post masssaging
                        AbstractArchive archive;
                        if (appClientFile.isDirectory()) {
                            archive = new FileArchive();
                            ((FileArchive) archive).open(appClientFile.getAbsolutePath());
                        } else {
                            archive = new InputJarArchive();
                            ((InputJarArchive) archive).open(appClientFile.getAbsolutePath());
                        }

                        if (appDesc.getMainClassName()==null || appDesc.getMainClassName().length()==0) {
                            appDesc.setMainClassName(className);
                            arch.processAnnotations(appDesc, archive);
                           
                            // let's remove our appArgs first element since it was the app client class name
                            //...but only if this is not a Java Web Start launch.
                            if (mainClass==null && ! isJWS) {
                                appArgs.removeElementAt(0);
View Full Code Here

            } else if (manager instanceof EjbModulesManager) {
                archivist = new EjbArchivist();
            } else if (manager instanceof WebModulesManager) {
                archivist = new WebArchivist();
            } else if (manager instanceof AppclientModulesManager) {
                archivist = new AppClientArchivist();
            } else if (manager instanceof ConnectorModulesManager) {
                archivist = new ConnectorArchivist();
            }

            archivist.setAnnotationProcessingRequested(false);
View Full Code Here

            /*
             *Yes, it's a .class file.  Use an app client archivist and, from
             *it, get the default app client descriptor.  Then create the
             *new app client info instance.
             */
            Archivist archivist = new AppClientArchivist();
            result = new ClassFileAppClientInfo(
                    isJWS,
                    logger,
                    locationFile,
                    archivist,
View Full Code Here

        generatedFileInfo.addArtifacts(helper.clientLevelDownloads());
    }

    private AppClientDeployerHelper createAndSaveHelper(final DeploymentContext dc,
            final ClassLoader clientModuleLoader) throws IOException {
            final AppClientArchivist archivist = habitat.getComponent(AppClientArchivist.class);
            final AppClientDeployerHelper h =
            AppClientDeployerHelper.newInstance(
                dc,
                archivist,
                clientModuleLoader,
View Full Code Here

        generatedFileInfo.addArtifacts(helper.clientLevelDownloads());
    }

    private AppClientDeployerHelper createAndSaveHelper(final DeploymentContext dc,
            final ClassLoader clientModuleLoader) throws IOException {
            final AppClientArchivist archivist = habitat.getService(AppClientArchivist.class);
            final AppClientDeployerHelper h =
            AppClientDeployerHelper.newInstance(
                dc,
                archivist,
                clientModuleLoader,
View Full Code Here

                        public ACCClassLoader run() {
                            return new ACCClassLoader(loader.getURLs(), loader.getParent());
                        }
                    });
            tempArchive = createArchive(tempLoader, mainClass);
            final AppClientArchivist acArchivist = getArchivist(tempArchive, tempLoader);
            archivist.setClassLoader(tempLoader);
            archivist.setDescriptor(acDesc);
            archivist.setAnnotationProcessingRequested(true);
            acDesc = acArchivist.open(tempArchive);
            Application.createVirtualApplication(null, acDesc.getModuleDescriptor());
            acDesc.getApplication().setAppName(appNameFromMainClass(mainClass));
            this.classLoader = loader;
        }
        return acDesc;
View Full Code Here

    }

    public ApplicationClientDescriptor getDescriptor(final URLClassLoader loader) throws IOException, SAXParseException {
        this.classLoader = loader;
        if (acDesc == null) {
            final AppClientArchivist _archivist = getArchivist(
                    AccessController.doPrivileged(new PrivilegedAction<ACCClassLoader>() {

                        @Override
                        public ACCClassLoader run() {
                            return new ACCClassLoader(loader.getURLs(), loader.getParent());
                        }
                    }));
                   
            _archivist.setAnnotationProcessingRequested(true);
            acDesc = _archivist.open(clientRA);
           
            Application.createVirtualApplication(null, acDesc.getModuleDescriptor());
            acDesc.getApplication().setAppName(getDefaultApplicationName(clientRA));
        }
        return acDesc;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.archivist.AppClientArchivist

Copyright © 2018 www.massapicom. 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.