Package org.glassfish.api.deployment

Examples of org.glassfish.api.deployment.DeploymentContext


    @Override
    public void event(Event event) {
        if (event.is(Deployment.DEPLOYMENT_BEFORE_CLASSLOADER_CREATION)) {
            // this is where we have processed metadata and
            // haven't created the application classloader yet
            DeploymentContext context = (DeploymentContext)event.hook();
            if (verify) {
                Verifier verifier = habitat.getService(Verifier.class);
                if (verifier != null) {
                    verifier.verify(context);
                } else  {
                    context.getLogger().warning("Verifier is not installed yet. Install verifier module.");
                }
            }
        }
    }
View Full Code Here


        try {
            Application app = applications.getApplication(name());
            ApplicationRef appRef = domain.getApplicationRefInServer(server.getName(), name());

            DeploymentContext dc = deployment.enable(target, app, appRef, report, logger);
            suppInfo.setDeploymentContext((ExtendedDeploymentContext)dc);

            if (!report.getActionExitCode().equals(ActionReport.ExitCode.FAILURE)) {
                // update the domain.xml
                try {
View Full Code Here

       
        try {
            Application app = applications.getApplication(appName);
            this.name = appName;

            final DeploymentContext basicDC = deployment.disable(this, app, appInfo, report, logger);
           
            suppInfo.setDeploymentContext((ExtendedDeploymentContext)basicDC);

        } catch (Exception e) {
            logger.log(Level.SEVERE, "Error during disabling: ", e);
View Full Code Here

                em = emf.createEntityManager();
            } catch(Throwable e) {
                // Log warning
                logger.log(Level.WARNING, e.getMessage(), e);
                DeploymentContext ctx = providerContainerContractInfo.getDeploymentContext();
                ActionReport subActionReport = ctx.getActionReport().addSubActionsReport();
                // Propagte warning to client side so that the deployer can see the warning.
                Java2DBProcessorHelper.warnUser(subActionReport, e.getMessage());
            } finally {
                if(em != null) {
                    em.close();
View Full Code Here

            for (URL url : getManifestLibraries(context)) {
                cloader.addURL(url);
            }

            try {
                final DeploymentContext dc = context;
                final ClassLoader cl = cloader;
               
                AccessController.doPrivileged(
                        new PermsArchiveDelegate.SetPermissionsAction(
                                SMGlobalPolicyUtil.CommponentType.ejb, dc, cl));
View Full Code Here

            ServletContainerInitializerUtil.getServletContainerInitializers(
                webFragmentMap, orderingList, hasOthers,
                wmInfo.getAppClassLoader());
        setServletContainerInitializerInterestList(allInitializers);

        DeploymentContext dc = getWebModuleConfig().getDeploymentContext();
        if (dc != null) {
            directoryDeployed =
                    Boolean.valueOf(dc.getAppProps().getProperty(ServerTags.DIRECTORY_DEPLOYED));
        }
        if (webBundleDescriptor != null) {
            showArchivedRealPathEnabled = webBundleDescriptor.isShowArchivedRealPathEnabled();
            servletReloadCheckSecs = webBundleDescriptor.getServletReloadCheckSecs();
        }
View Full Code Here

            // Alternate deployment descriptors are only supported for
            // WAR files embedded inside EAR files
            return;
        }

        DeploymentContext dc = getWebModuleConfig().getDeploymentContext();
        if (dc == null) {
            return;
        }

        altDDName = altDDName.trim();
        if (altDDName.startsWith("/")) {
            altDDName = altDDName.substring(1);
        }
     
        String appLoc = dc.getSource().getParentArchive().getURI().getPath();
        altDDName = appLoc + altDDName;

        if (logger.isLoggable(Level.FINE)) {
            Object[] objs = {altDDName, wmInfo.getName()};
            logger.log(Level.FINE, ALT_DD_NAME, objs);
View Full Code Here

    @Override
    public void event(Event event) {
        if (event.is(Deployment.DEPLOYMENT_BEFORE_CLASSLOADER_CREATION)) {
            // this is where we have processed metadata and
            // haven't created the application classloader yet
            DeploymentContext context = (DeploymentContext)event.hook();
            if (verify) {
                Verifier verifier = habitat.getService(Verifier.class);
                if (verifier != null) {
                    verifier.verify(context);
                } else  {
                    context.getLogger().warning("Verifier is not installed yet. Install verifier module.");
                }
            }
        }
    }
View Full Code Here

            }

            // first check if the parent is an ear and if so see if there are app libs defined there.
            if ( ! earContextAppLibBdasProcessed && context instanceof DeploymentContextImpl ) {
                DeploymentContextImpl deploymentContext = ( DeploymentContextImpl ) context;
                DeploymentContext parentContext = deploymentContext.getParentContext();
                if ( parentContext != null ) {
                    processBdasForAppLibs( parentContext.getSource(), parentContext );
                    parentContext.getSource();
                    earContextAppLibBdasProcessed = true;
                }
            }

            // then check the module
View Full Code Here

        // handle the case where the application is not enabled in DAS (no ConnectorApplication)


        if (/*env.isDas() && */ Deployment.UNDEPLOYMENT_VALIDATION.equals(event.type())) {
            //this is an application undeploy event
            DeploymentContext dc = (DeploymentContext) event.hook();
            UndeployCommandParameters dcp = dc.getCommandParameters(UndeployCommandParameters.class);
            String appName = dcp.name;
            Boolean cascade = dcp.cascade;
            Boolean ignoreCascade = dcp._ignoreCascade;

            if (cascade != null && ignoreCascade != null) {
View Full Code Here

TOP

Related Classes of org.glassfish.api.deployment.DeploymentContext

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.