Examples of Sniffer


Examples of org.glassfish.api.container.Sniffer

                } else {
                    return new Container(new EmbeddedContainer() {

                        public List<Sniffer> getSniffers() {
                            List<Sniffer> sniffers = new ArrayList<Sniffer>();
                            Sniffer s = habitat.getComponent(Sniffer.class, type.toString());
                            if (s!=null) {
                                sniffers.add(s);
                            }
                            return sniffers;
                        }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

    }

    @Override
    public boolean equals(Object other) {
        if (other instanceof Sniffer) {
            Sniffer otherSniffer = (Sniffer)other;
            return getModuleType().equals(otherSniffer.getModuleType());
        }
        return false;
    }
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

    /**
     * Starts the web container
     */
    private void startWebContainer() {
        Sniffer webSniffer = habitat.getComponent(Sniffer.class,"web");
        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 {
            Module snifferModule = modulesRegistry.find(webSniffer.getClass());
            try {
                Collection<EngineInfo> containersInfo =
                    containerStarter.startContainer(webSniffer, snifferModule);
                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 = MessageFormat.format(
                        rb.getString("core.unable_start_container"),
                        webSniffer.getContainersNames()[0]);
                logger.log(Level.SEVERE, msg, e);
            }
        }
    }
View Full Code Here

Examples of org.glassfish.api.container.Sniffer

        StringTokenizer st = new StringTokenizer(type);
        List<Sniffer> sniffers = new ArrayList<Sniffer>();
        while (st.hasMoreTokens()) {
            String aType = st.nextToken();
            Sniffer sniffer = snifferManager.getSniffer(aType);
            if (sniffer==null) {
                report.failure(logger, localStrings.getLocalString("deploy.unknowncontainer", "{0} is not a recognized container ", new String[] { aType }));
                return sniffers;
            }
            if (!snifferManager.canBeIsolated(sniffer)) {
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, "cannot.find.sniffer", new Object[] {snifferType});
                }
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

                // 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

        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

        }

        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, "cannot.find.sniffer", new Object[] {snifferType});
                }
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.