Package org.glassfish.api.deployment

Examples of org.glassfish.api.deployment.DeploymentContext


            } else {
                carCL = loader.createRARClassLoader(moduleDir, null, moduleName, appLibs);
            }
                       
            try {
                final DeploymentContext dc = context;
                final ClassLoader cl = carCL;
               
                AccessController.doPrivileged(
                        new PermsArchiveDelegate.SetPermissionsAction(
                                SMGlobalPolicyUtil.CommponentType.rar, dc, cl));
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.getByContract(Verifier.class);
                if (verifier != null) {
                    verifier.verify(context);
                } else  {
                    context.getLogger().warning("Verifier is not installed yet. Install verifier module.");
                }
            }
        }
    }
View Full Code Here

        ActionReport report = context.getActionReport();
        final Logger logger = context.getLogger();

        final DeployCommandSupplementalInfo suppInfo =
                context.getActionReport().getResultType(DeployCommandSupplementalInfo.class);
        final DeploymentContext dc = suppInfo.deploymentContext();
        final DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class);

        // if the target is DAS, we do not need to do anything more
        if (DeploymentUtils.isDASTarget(params.target)) {
            return;
        }
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

        Properties props = null;

        if (appContext!=null) {
            wmInfo.setAppClassLoader(appContext.getClassLoader());
            if (appContext instanceof DeploymentContext) {
                DeploymentContext deployContext = (DeploymentContext)appContext;
                wmInfo.setDeploymentContext(deployContext);
                if (isKeepState(deployContext, true)) {
                    props = deployContext.getAppProps();
                }
            }
            applyApplicationConfig(appContext);
        }
View Full Code Here

    @Override
    public boolean stop(ApplicationContext stopContext) {

        if (stopContext instanceof DeploymentContext) {
            DeploymentContext deployContext = (DeploymentContext)stopContext;

            Properties props = null;
            boolean keepSessions = isKeepState(deployContext, false);
            if (keepSessions) {
                props = new Properties();
View Full Code Here

    @Override
    public Map<String, List<ScannedAnnotation>> getAnnotatedClassesInCurrentModule(ServletContext servletContext)
    throws InjectionProviderException {

        DeploymentContext dc = (DeploymentContext)servletContext.getAttribute(Constants.DEPLOYMENT_CONTEXT_ATTRIBUTE);
        Types types = dc.getTransientAppMetaData(Types.class.getName(), Types.class);
        Collection<Type> allTypes = types.getAllTypes();
        Collection<AnnotationModel> annotations = null;
        Map<String, List<ScannedAnnotation>> classesByAnnotation =
                new HashMap<String, List<ScannedAnnotation>>();
        List<ScannedAnnotation> classesWithThisAnnotation = null;
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

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.