Package org.apache.tomcat.util.descriptor.web

Examples of org.apache.tomcat.util.descriptor.web.ContextService


        } else if (type.equals("addService")) {

            String serviceName = (String) event.getData();
            if (serviceName != null) {
                ContextService service =
                    namingResources.findService(serviceName);
                addService(service);
            }

        } else if (type.equals("removeEjb")) {
View Full Code Here


                    addResourceLink(rl);
                }
            }
        } else if (name.equals("service")) {
            if (oldValue != null) {
                ContextService service = (ContextService) oldValue;
                if (service.getName() != null) {
                    removeService(service.getName());
                }
            }
            if (newValue != null) {
                ContextService service = (ContextService) newValue;
                if (service.getName() != null) {
                    addService(service);
                }
            }
        }
View Full Code Here

            context.getNamingResources().addEnvironment(resource);

        } else if (type.equals("javax.xml.rpc.Service")) {

            // service-ref element
            ContextService service = new ContextService();

            service.setName(name);
            service.setWsdlfile(annotation.mappedName());

            service.setType(type);
            service.setDescription(annotation.description());

            context.getNamingResources().addService(service);

        } else if (type.equals("javax.sql.DataSource") ||
                type.equals("javax.jms.ConnectionFactory") ||
View Full Code Here

            context.getNamingResources().addEnvironment(resource);

        } else if (type.equals("javax.xml.rpc.Service")) {

            // service-ref element
            ContextService service = new ContextService();

            service.setName(name);
            service.setWsdlfile(annotation.mappedName());

            service.setType(type);
            service.setDescription(annotation.description());

            context.getNamingResources().addService(service);

        } else if (type.equals("javax.sql.DataSource") ||
                type.equals("javax.jms.ConnectionFactory") ||
View Full Code Here

        } else if (type.equals("addService")) {

            String serviceName = (String) event.getData();
            if (serviceName != null) {
                ContextService service =
                    namingResources.findService(serviceName);
                addService(service);
            }

        } else if (type.equals("removeEjb")) {
View Full Code Here

                    addResourceLink(rl);
                }
            }
        } else if (name.equals("service")) {
            if (oldValue != null) {
                ContextService service = (ContextService) oldValue;
                if (service.getName() != null) {
                    removeService(service.getName());
                }
            }
            if (newValue != null) {
                ContextService service = (ContextService) newValue;
                if (service.getName() != null) {
                    addService(service);
                }
            }
        }
View Full Code Here

     * none have been defined, a zero-length array is returned.
     */
    public ContextService[] findServices() {

        synchronized (services) {
            ContextService results[] = new ContextService[services.size()];
            return services.values().toArray(results);
        }

    }
View Full Code Here

     */
    public void removeService(String name) {

        entries.remove(name);

        ContextService service = null;
        synchronized (services) {
            service = services.remove(name);
        }
        if (service != null) {
            support.firePropertyChange("service", service, null);
            service.setNamingResources(null);
        }

    }
View Full Code Here

            context.getNamingResources().addEnvironment(resource);

        } else if (type.equals("javax.xml.rpc.Service")) {

            // service-ref element
            ContextService service = new ContextService();

            service.setName(name);
            service.setWsdlfile(annotation.mappedName());

            service.setType(type);
            service.setDescription(annotation.description());

            context.getNamingResources().addService(service);

        } else if (type.equals("javax.sql.DataSource") ||
                type.equals("javax.jms.ConnectionFactory") ||
View Full Code Here

                }
            }
        }

        // if there was a service entry, remove it
        final ContextService service = naming.findService(ref.referenceName.replaceAll("^comp/env/", ""));
        final String serviceName = service != null ? service.getName() : null;
        if (serviceName != null) {
            ContextAccessController.setWritable(namingContextListener.getName(), standardContext.getNamingToken());
            if (!addEntry) {
                namingContextListener.removeService(serviceName);
            }
View Full Code Here

TOP

Related Classes of org.apache.tomcat.util.descriptor.web.ContextService

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.