Class GenericHotDeploymentTool
java.lang.Object
org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool
org.apache.tools.ant.taskdefs.optional.j2ee.GenericHotDeploymentTool
- All Implemented Interfaces:
- HotDeploymentTool
- Direct Known Subclasses:
- JonasHotDeploymentTool
A generic tool for J2EE server hot deployment.
  
The simple implementation spawns a JVM with the supplied class name, jvm args, and arguments.
- See Also:
- 
Field SummaryFields inherited from interface org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentToolACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdd a nested argument element to hand to the deployment tool; optional.Add a nested argument element to hand to the JVM running the deployment tool.voiddeploy()Perform the actual deployment.Get the classname attribute.getJava()get the java attribute.protected booleanDetermines if the "action" attribute defines a valid action.voidsetClassName(String className) The name of the class to execute to perform deployment; required.voidsetTask(ServerDeploy task) Sets the parent task.voidValidates the passed in attributes.Methods inherited from class org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentToolcreateClasspath, getClasspath, getPassword, getServer, getTask, getUserName, setClasspath, setPassword, setServer, setUserName
- 
Constructor Details- 
GenericHotDeploymentToolpublic GenericHotDeploymentTool()
 
- 
- 
Method Details- 
createArgAdd a nested argument element to hand to the deployment tool; optional.- Returns:
- A Commandline.Argument object representing the command line argument being passed when the deployment tool is run. IE: "-user=mark", "-password=venture"...
 
- 
createJvmargAdd a nested argument element to hand to the JVM running the deployment tool. Creates a nested arg element.- Returns:
- A Commandline.Argument object representing the JVM command line argument being passed when the deployment tool is run. IE: "-ms64m", "-mx128m"...
 
- 
isActionValidprotected boolean isActionValid()Determines if the "action" attribute defines a valid action.Subclasses should determine if the action passed in is supported by the vendor's deployment tool. For this generic implementation, the only valid action is "deploy" - Specified by:
- isActionValidin class- AbstractHotDeploymentTool
- Returns:
- true if the "action" attribute is valid, false if not.
 
- 
setTaskSets the parent task.- Specified by:
- setTaskin interface- HotDeploymentTool
- Overrides:
- setTaskin class- AbstractHotDeploymentTool
- Parameters:
- task- An ServerDeploy object representing the parent task.
 
- 
deployPerform the actual deployment. For this generic implementation, a JVM is spawned using the supplied classpath, classname, JVM args, and command line arguments.- Throws:
- BuildException- if the attributes are invalid or incomplete.
 
- 
validateAttributesValidates the passed in attributes. Ensures the className and arguments attribute have been set.- Specified by:
- validateAttributesin interface- HotDeploymentTool
- Overrides:
- validateAttributesin class- AbstractHotDeploymentTool
- Throws:
- BuildException- if the attributes are invalid or incomplete.
 
- 
setClassNameThe name of the class to execute to perform deployment; required. Example: "com.foobar.tools.deploy.DeployTool"- Parameters:
- className- The fully qualified class name of the class to perform deployment.
 
- 
getJava
- 
getClassName
 
-