Package org.glassfish.javaee.core.deployment

Examples of org.glassfish.javaee.core.deployment.ApplicationHolder


             * We know that the expansion is into a directory, so we should know
             * that target is a FileArchive which is also readable as-is.
             */
            source2 = (FileArchive) target;

            ApplicationHolder holder =
                getApplicationHolder(source2, context, false);

            // now start to expand the sub modules
            for (ModuleDescriptor md : holder.app.getModules()) {
                String moduleUri = md.getArchiveUri();
View Full Code Here


    }

    public ClassLoader getClassLoader(final ClassLoader parent, DeploymentContext context) {
        final ReadableArchive archive  = context.getSource();

        ApplicationHolder holder =
            getApplicationHolder(archive, context, true);

        // the ear classloader hierachy will be
        // ear lib classloader <- embedded rar classloader <-
        // ear classloader <- various module classloaders
View Full Code Here

        getApplicationHolder(context.getSource(), context, true);
    }

    private ApplicationHolder getApplicationHolder(ReadableArchive source,
        DeploymentContext context, boolean isDirectory) {
        ApplicationHolder holder = context.getModuleMetaData(ApplicationHolder.class);
        if (holder==null || holder.app==null) {
            try {
                DeployCommandParameters params = context.getCommandParameters(DeployCommandParameters.class);
                if (params != null && params.altdd != null) {
                    source.addArchiveMetaData(DeploymentProperties.ALT_DD,
                        params.altdd);
                }
                long start = System.currentTimeMillis();
                ApplicationArchivist archivist = habitat.getService(ApplicationArchivist.class);
                archivist.setAnnotationProcessingRequested(true);

                String xmlValidationLevel = dasConfig.getDeployXmlValidation();
                archivist.setXMLValidationLevel(xmlValidationLevel);
                if (xmlValidationLevel.equals("none")) {
                    archivist.setXMLValidation(false);
                }

                holder = new ApplicationHolder(archivist.createApplication(
                    source, isDirectory));
                _logger.fine("time to read application.xml " + (System.currentTimeMillis() - start));
            } catch (IOException e) {
                throw new RuntimeException(e);
            } catch (SAXParseException e) {
View Full Code Here

             * We know that the expansion is into a directory, so we should know
             * that target is a FileArchive which is also readable as-is.
             */
            source2 = (FileArchive) target;

            ApplicationHolder holder =
                getApplicationHolder(source2, context, false);

            // now start to expand the sub modules
            for (ModuleDescriptor md : holder.app.getModules()) {
                String moduleUri = md.getArchiveUri();
View Full Code Here

    }

    public ClassLoader getClassLoader(final ClassLoader parent, DeploymentContext context) {
        final ReadableArchive archive  = context.getSource();
       
        ApplicationHolder holder =
            getApplicationHolder(archive, context, true);

        // the ear classloader hierachy will be
        // ear lib classloader <- embedded rar classloader <-
        // ear classloader <- various module classloaders
View Full Code Here

        getApplicationHolder(context.getSource(), context, true);
    }

    private ApplicationHolder getApplicationHolder(ReadableArchive source,
        DeploymentContext context, boolean isDirectory) {
        ApplicationHolder holder = context.getModuleMetaData(ApplicationHolder.class);
        if (holder==null || holder.app==null) {
            try {
                DeployCommandParameters params = context.getCommandParameters(DeployCommandParameters.class);
                if (params != null && params.altdd != null) {
                    source.addArchiveMetaData(DeploymentProperties.ALT_DD,
                        params.altdd);
                }
                long start = System.currentTimeMillis();
                ApplicationArchivist archivist = habitat.getService(ApplicationArchivist.class);
                archivist.setAnnotationProcessingRequested(true);

                String xmlValidationLevel = dasConfig.getDeployXmlValidation();
                archivist.setXMLValidationLevel(xmlValidationLevel);
                if (xmlValidationLevel.equals("none")) {
                    archivist.setXMLValidation(false);
                }

                holder = new ApplicationHolder(archivist.createApplication(
                    source, isDirectory));
                _logger.fine("time to read application.xml " + (System.currentTimeMillis() - start));
            } catch (IOException e) {
                throw new RuntimeException(e);
            } catch (SAXParseException e) {
View Full Code Here

        return wbApp;
    }

    private void addWeldListenerToAllWars(DeploymentContext context) {
        // if there's at least 1 ejb jar then add the listener to all wars
        ApplicationHolder applicationHolder = context.getModuleMetaData(ApplicationHolder.class);
        if ( applicationHolder != null ) {
            if ( applicationHolder.app.getBundleDescriptors(EjbBundleDescriptor.class).size() > 0 ) {
                Set<WebBundleDescriptor> webBundleDescriptors = applicationHolder.app.getBundleDescriptors(WebBundleDescriptor.class);
                for ( WebBundleDescriptor oneWebBundleDescriptor : webBundleDescriptors ) {
                    // Add the Weld Listener if it does not already exist..
View Full Code Here

TOP

Related Classes of org.glassfish.javaee.core.deployment.ApplicationHolder

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.