Examples of Sniffer


Examples of org.glassfish.api.container.Sniffer

                // server is started in EJBContainerImpl constructor
                container = new EJBContainerImpl(server);

                archiveFactory = server.getService(ArchiveFactory.class);

                Sniffer sniffer = server.getService(Sniffer.class, "Ejb");
                ejbAnnotations = sniffer.getAnnotationTypes();
            } catch (Exception e) {
                try {
                    if (container != null) {
                        container.stop();
                    }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

     *
     * @param engType - type of sniffer engine
     * @return true if visible, else false.
     */
    boolean displaySnifferEngine(String engType) {
        final Sniffer sniffer = snifferManager.getSniffer(engType);
        return sniffer.isUserVisible();
    }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

        context.setArchiveHandler(handler);
        context.addTransientAppMetaData(Types.class.getName(), types);
        Collection<Sniffer> sniffers = snifferManager.getSniffers(context, classPathURIs, types);
        context.postDeployClean(true);
        String type = getTypeFromModuleType(md.getModuleType());
        Sniffer mainSniffer = null;
        for (Sniffer sniffer : sniffers) {
            if (sniffer.getModuleType().equals(type)) {
                mainSniffer = sniffer;
            }
        }

        // if the sub module does not show characteristics of certain module
        // type, we should still use the application.xml defined module type
        // to add the appropriate sniffer
        if (mainSniffer == null) {
            mainSniffer = snifferManager.getSniffer(type);
            sniffers.add(mainSniffer);
        }

        String [] incompatibleTypes = mainSniffer.getIncompatibleSnifferTypes();
        List<String> allIncompatTypes = addAdditionalIncompatTypes(mainSniffer, incompatibleTypes);

        List<Sniffer> sniffersToRemove = new ArrayList<Sniffer>();
        for (Sniffer sniffer : sniffers) {
            for (String incompatType : allIncompatTypes) {
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

       
        final ActionReport report = context.getActionReport();

        ActionReport.MessagePart part = report.getTopMessagePart();

        Sniffer sniffer = snifferManager.getSniffer(sniffername);

        if (sniffer != null) {
            String isVisible = String.valueOf(sniffer.isUserVisible());

            part.addProperty(DeploymentProperties.IS_SNIFFER_USER_VISIBLE, isVisible);

            part.setMessage(isVisible);
        }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

            if (appInfo.getEngineRefs().size() > 0)
            {
                // composite archive case, i.e. ear
                for (EngineRef ref : appInfo.getEngineRefs())
                {
                    Sniffer appSniffer = ref.getContainerInfo().getSniffer();
                    addToResultDDList("", appSniffer.getDeploymentConfigurations(appInfo.getSource()), part);
                }

                for (ModuleInfo moduleInfo : appInfo.getModuleInfos())
                {
                    for (Sniffer moduleSniffer : moduleInfo.getSniffers())
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

                validateInstanceDirectory();

                archiveFactory = server.getService(ArchiveFactory.class);

                Sniffer sniffer = server.getService(Sniffer.class, "Ejb");
                ejbAnnotations = sniffer.getAnnotationTypes();
            } catch (Exception e) {
                try {
                    if (container != null) {
                        container.stop();
                    }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

        }

        List<Sniffer> sniffers = new ArrayList<Sniffer>();
        if (app.isStandaloneModule()) {
            for (String snifferType : snifferTypes) {
                Sniffer sniffer = snifferManager.getSniffer(snifferType);
                if (sniffer != null) {
                    sniffers.add(sniffer);
                } else {
                    logger.log(Level.SEVERE, KernelLoggerInfo.cantFindSniffer, snifferType);
                }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

        DeployCommandParameters parameters = new DeployCommandParameters(new File(archive.getURI()));
        ExtendedDeploymentContext context = new DeploymentContextImpl(null, archive, parameters, habitat.<ServerEnvironment>getService(ServerEnvironment.class));
        context.setArchiveHandler(handler);
        Collection<Sniffer> sniffers = snifferManager.getSniffers(context, classPathURIs, types);
        String type = getTypeFromModuleType(md.getModuleType());
        Sniffer mainSniffer = null;
        for (Sniffer sniffer : sniffers) {
            if (sniffer.getModuleType().equals(type)) {
                mainSniffer = sniffer;
            }
        }

        // if the sub module does not show characteristics of certain module
        // type, we should still use the application.xml defined module type
        // to add the appropriate sniffer
        if (mainSniffer == null) {
            mainSniffer = snifferManager.getSniffer(type);
            sniffers.add(mainSniffer);
        }

        String [] incompatibleTypes = mainSniffer.getIncompatibleSnifferTypes();
        List<String> allIncompatTypes = addAdditionalIncompatTypes(mainSniffer, incompatibleTypes);

        List<Sniffer> sniffersToRemove = new ArrayList<Sniffer>();
        for (Sniffer sniffer : sniffers) {
            for (String incompatType : allIncompatTypes) {
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

    /**
     * Starts the web container
     */
    private void startWebContainer() {
        Sniffer webSniffer = webSnifferProvider.get();
        if (webSniffer==null) {
            if (logger.isLoggable(Level.INFO)) {
                logger.info("core.web_container_not_installed");
            }
            return;
        }
       
        if (containerRegistry.getContainer(
                    webSniffer.getContainersNames()[0]) != null) {
            containerRegistry.getContainer(
                    webSniffer.getContainersNames()[0]).getContainer();
        } else {
            try {
                Collection<EngineInfo> containersInfo =
                    containerStarter.startContainer(webSniffer);
                if (containersInfo != null && !containersInfo.isEmpty()) {
                    // Start each container
                    for (EngineInfo info : containersInfo) {
                        info.getContainer();
                        if (logger.isLoggable(Level.INFO)) {
                            logger.log(Level.INFO, "core.start_container_done",
                                webSniffer.getModuleType());
                        }
                    }
                } else {
                    logger.severe("core.unable_start_container_no_exception");
                }
            } catch (Exception e) {
                String msg;
                if ( rb != null ) {
                    msg = MessageFormat.format( rb.getString("core.unable_start_container"), webSniffer.getContainersNames()[0]);
                } else {
                    msg = "Unable to start Web Container: " + webSniffer.getContainersNames()[0];
                }
                logger.log(Level.SEVERE, msg, e);
            }
        }
    }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

        context.setArchiveHandler(handler);
        context.addTransientAppMetaData(Types.class.getName(), types);
        Collection<Sniffer> sniffers = snifferManager.getSniffers(context, classPathURIs, types);
        context.postDeployClean(true);
        String type = getTypeFromModuleType(md.getModuleType());
        Sniffer mainSniffer = null;
        for (Sniffer sniffer : sniffers) {
            if (sniffer.getModuleType().equals(type)) {
                mainSniffer = sniffer;
            }
        }

        // if the sub module does not show characteristics of certain module
        // type, we should still use the application.xml defined module type
        // to add the appropriate sniffer
        if (mainSniffer == null) {
            mainSniffer = snifferManager.getSniffer(type);
            sniffers.add(mainSniffer);
        }

        String [] incompatibleTypes = mainSniffer.getIncompatibleSnifferTypes();
        List<String> allIncompatTypes = addAdditionalIncompatTypes(mainSniffer, incompatibleTypes);

        List<Sniffer> sniffersToRemove = new ArrayList<Sniffer>();
        for (Sniffer sniffer : sniffers) {
            for (String incompatType : allIncompatTypes) {
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.