Package org.apache.catalina.deploy

Examples of org.apache.catalina.deploy.NamingResources.findResources()


            // Store nested <LocalEjb> elements
            ContextLocalEjb[] lejbs = resources.findLocalEjbs();
            storeElementArray(aWriter, indent, lejbs);

            // Store nested <Resource> elements
            ContextResource[] dresources = resources.findResources();
            storeElementArray(aWriter, indent, dresources);

            // Store nested <ResourceEnvRef> elements
            ContextResourceEnvRef[] resEnv = resources.findResourceEnvRefs();
            storeElementArray(aWriter, indent, resEnv);
View Full Code Here


            logger.error("Unable to process annotation in " + standardContext.getPath() + ": Exception: " + e.getMessage(), e);
        }

        // remove all jndi entries where there is a configured Tomcat resource or resource-link
        webApp = webModule.getWebApp();
        for (ContextResource resource : naming.findResources()) {
            String name = resource.getName();
            removeRef(webApp, name);
        }
        for (ContextResourceLink resourceLink : naming.findResourceLinks()) {
            String name = resourceLink.getName();
View Full Code Here

            // Store nested <LocalEjb> elements
            ContextLocalEjb[] lejbs = resources.findLocalEjbs();
            storeElementArray(aWriter, indent, lejbs);

            // Store nested <Resource> elements
            ContextResource[] dresources = resources.findResources();
            storeElementArray(aWriter, indent, dresources);

            // Store nested <ResourceEnvRef> elements
            ContextResourceEnvRef[] resEnv = resources.findResourceEnvRefs();
            storeElementArray(aWriter, indent, resEnv);
View Full Code Here

            envEntry.setEnvEntryValue(environment.getValue());
            envEntry.setEnvEntryType(environment.getType());
        }

        // remove all jndi entries where there is a configured Tomcat resource or resource-link
        for (final ContextResource resource : naming.findResources()) {
            final String name = resource.getName();
            removeRef(webApp, name);
        }
        for (final ContextResourceLink resourceLink : naming.findResourceLinks()) {
            final String name = resourceLink.getName();
View Full Code Here

        final NamingResources resources = context.getNamingResources();
        if (resources == null) {
            return;
        }

        final ContextResource[] foundResources = resources.findResources();
        String[] ids = null;
        if (foundResources != null) {
            for (final ContextResource resource : foundResources) {
                if ("javax.sql.DataSource".equals(resource.getType())) {
                    String jndiName = (String) resource.getProperty("mappedName");
View Full Code Here

            // Store nested <LocalEjb> elements
            ContextLocalEjb[] lejbs = resources.findLocalEjbs();
            storeElementArray(aWriter, indent, lejbs);

            // Store nested <Resource> elements
            ContextResource[] dresources = resources.findResources();
            storeElementArray(aWriter, indent, dresources);

            // Store nested <ResourceEnvRef> elements
            ContextResourceEnvRef[] resEnv = resources.findResourceEnvRefs();
            storeElementArray(aWriter, indent, resEnv);
View Full Code Here

            String contextName = context.getName();
            if (!contextName.startsWith("/"))
                contextName = "/" + contextName;
            Host host = (Host) context.getParent();

            for (ContextResource resource : namingResources.findResources()) {
                log.info("Created " + getResourceTypeDisplayName(resource) + " with JNDI binding java:comp/env/" + resource.getName() + " on host=" + host.getName() + ", path=" + contextName);
            }
            for (ContextResourceLink resource : namingResources.findResourceLinks()) {
                log.info("Created " + getResourceTypeDisplayName(resource) + " with JNDI binding java:comp/env/" + resource.getName() + " on host=" + host.getName() + ", path=" + contextName);
            }
View Full Code Here

            }
        } else if (source instanceof Server) {
            Server server = (Server) source;
            NamingResources namingResources = server.getGlobalNamingResources();

            for (ContextResource resource : namingResources.findResources()) {
                log.info("Created " + getResourceTypeDisplayName(resource) + " with JNDI binding java:comp/env/" + resource.getName() + " on server");
            }
            for (ContextResourceLink resource : namingResources.findResourceLinks()) {
                log.info("Created " + getResourceTypeDisplayName(resource) + " with JNDI binding java:comp/env/" + resource.getName() + " on server");
            }
View Full Code Here

            envEntry.setEnvEntryValue(environment.getValue());
            envEntry.setEnvEntryType(environment.getType());
        }

        // remove all jndi entries where there is a configured Tomcat resource or resource-link
        for (final ContextResource resource : naming.findResources()) {
            final String name = resource.getName();
            removeRef(webApp, name);
        }
        for (final ContextResourceLink resourceLink : naming.findResourceLinks()) {
            final String name = resourceLink.getName();
View Full Code Here

        final NamingResources resources = context.getNamingResources();
        if (resources == null) {
            return;
        }

        final ContextResource[] foundResources = resources.findResources();
        String[] ids = null;
        if (foundResources != null) {
            for (final ContextResource resource : foundResources) {
                if ("javax.sql.DataSource".equals(resource.getType())) {
                    String jndiName = (String) resource.getProperty("mappedName");
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.