Class InstalledCargoApplicationContainer
java.lang.Object
com.sun.xml.ws.test.container.AbstractApplicationContainer
com.sun.xml.ws.test.container.cargo.InstalledCargoApplicationContainer
- All Implemented Interfaces:
ApplicationContainer
ApplicationContainer that launches a container from within the harness.
This uses an image of the container installed locally, but this operation does not affect the data file and configuration files in that installation, so you need not have an installation dedicated to this test harness.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codehaus.cargo.container.InstalledLocalContainerExpected to be set by the constructor of the derived class.protected final org.codehaus.cargo.generic.deployable.DefaultDeployableFactoryprotected final org.codehaus.cargo.generic.deployer.DefaultDeployerFactoryprotected final int -
Constructor Summary
ConstructorsConstructorDescriptionInstalledCargoApplicationContainer(WsTool wsimport, WsTool wsgen, String containerId, File homeDir, int port, boolean httpspi) -
Method Summary
Modifier and TypeMethodDescriptionprotected WARassembleWar(DeployedService service) Prepares an exploded war file image for this service.deploy(DeployedService service) Starts a service inside a container, making it ready to process requests.static intprotected URLgetServiceUrl(String contextPath) Returns the transport that this container uses for testing.protected booleanTrue if the Cargo implementation only takes a .war file and not the exploded war image.voidshutdown()Stops the container.voidstart()Starts the container.toString()For tomcat local, since cargo doesn't support copying of shared/lib jars, the war can be created with the jars in the WEB-INF/lib.Methods inherited from class com.sun.xml.ws.test.container.AbstractApplicationContainer
copyRuntimeLibraries, createWARZip, getUnsupportedUses, updateWsgenOpts, updateWsitClient
-
Field Details
-
httpPort
protected final int httpPort -
container
protected org.codehaus.cargo.container.InstalledLocalContainer containerExpected to be set by the constructor of the derived class. Conceptually final --- no update after that. -
deployerFactory
protected final org.codehaus.cargo.generic.deployer.DefaultDeployerFactory deployerFactory -
deployableFactory
protected final org.codehaus.cargo.generic.deployable.DefaultDeployableFactory deployableFactory
-
-
Constructor Details
-
InstalledCargoApplicationContainer
public InstalledCargoApplicationContainer(WsTool wsimport, WsTool wsgen, String containerId, File homeDir, int port, boolean httpspi) throws IOException - Parameters:
containerId- The ID that represents the container. "tomcat5x" for Tomcat.homeDir- The installation of the container. For Tomcat, this is- Throws:
IOException
-
-
Method Details
-
toString
For tomcat local, since cargo doesn't support copying of shared/lib jars, the war can be created with the jars in the WEB-INF/lib. Other option is to subclass Tomcat5xStandaloneLocalConfiguration and do the copying of jars from Tomcat installation to local working dir in doConfigure() Copy JAX-WS runtime code? protected boolean copyRuntimeLibraries() { return false; } -
assembleWar
Description copied from class:AbstractApplicationContainerPrepares an exploded war file image for this service.- Overrides:
assembleWarin classAbstractApplicationContainer- Throws:
Exception
-
start
Description copied from interface:ApplicationContainerStarts the container. This is invoked at the very beginning before any service is deployed.- Throws:
Exception
-
shutdown
Description copied from interface:ApplicationContainerStops the container. This is invoked at the end to clean up any resources.- Throws:
Exception
-
getServiceUrl
- Throws:
Exception
-
getFreePort
public static int getFreePort() -
getTransport
Description copied from interface:ApplicationContainerReturns the transport that this container uses for testing.- Returns:
- For example, "http", "local", "tcp", "jms", etc. It should match the scheme portion of the endpoint address URI. Never null. This value is compared in the descriptor's transport declaration to decide wheter to run a test or not.
-
deploy
Description copied from interface:ApplicationContainerStarts a service inside a container, making it ready to process requests.- Throws:
Exception
-
needsArchive
protected boolean needsArchive()True if the Cargo implementation only takes a .war file and not the exploded war image. Not creating a war file makes the testing faster.
-