Package org.apache.cactus.container

Examples of org.apache.cactus.container.ContainerWrapper


            for (int i = 0; i < cargoElements.length; i++)
            {
                CargoElement element = (CargoElement) cargoElements[i];
                Container container = element.getCargoContainer();
                ContainerWrapper wrapper = new ContainerWrapper(container);
                wrapper.setLogger(new AntLogger(this));

                // Clone the DeployableFile instance as each container can
                // override default deployment properties (e.g. port, context
                // root, etc).
                DeployableFile thisDeployable = null;
                try
                {
                    thisDeployable = (DeployableFile) deployableFile.clone();
                }
                catch (CloneNotSupportedException e)
                {
                    throw new BuildException(e);
                }

                // Allow the container to override the default test context.
                // This is to support container extensions to the web.xml file.
                // Most containers allow defining the root context in these
                // extensions.
                wrapper.setSystemProperties(this.systemProperties);

                // Add extra classpath entries
                if (containerClasspath != null)
                {
                    wrapper.setContainerClasspath(this.containerClasspath
                        .list());
                }
               
                if (wrapper.isEnabled())
                {
                    wrapper.init();
                    log("--------------------------------------------------"
                        + "---------------", Project.MSG_INFO);
                    log("Running tests against " + wrapper.getName()
                        + " @ " + wrapper.getBaseURL(),
                        Project.MSG_INFO);
                    log("--------------------------------------------------"
                        + "---------------", Project.MSG_INFO);
                    contextUrl.setValue(wrapper.getBaseURL() + "/"
                        + thisDeployable.getTestContext());
                    executeInContainer(wrapper, thisDeployable);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.cactus.container.ContainerWrapper

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.