Class WebLogicHotDeploymentTool
- java.lang.Object
- 
- org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool
- 
- org.apache.tools.ant.taskdefs.optional.j2ee.WebLogicHotDeploymentTool
 
 
- 
- All Implemented Interfaces:
- HotDeploymentTool
 
 public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool implements HotDeploymentTool An Ant wrapper task for the weblogic.deploy tool. This is used to hot-deploy J2EE applications to a running WebLogic server. This is not the same as creating the application archive. This task assumes the archive (EAR, JAR, or WAR) file has been assembled and is supplied as the "source" attribute.In the end, this task assembles the commandline parameters and runs the weblogic.deploy tool in a separate JVM. - See Also:
- HotDeploymentTool,- AbstractHotDeploymentTool,- ServerDeploy
 
- 
- 
Field Summary- 
Fields inherited from interface org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentToolACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE
 
- 
 - 
Constructor SummaryConstructors Constructor Description WebLogicHotDeploymentTool()
 - 
Method SummaryModifier and Type Method Description protected java.lang.StringBufferbuildArgsPrefix()Builds the prefix arguments to pass to weblogic.deploy.protected java.lang.StringbuildDeployArgs()Builds the arguments to pass to weblogic.deploy for deployment actions ("deploy" and "update").protected java.lang.StringbuildListArgs()Builds the arguments to pass to weblogic.deploy for the list actionprotected java.lang.StringbuildUndeployArgs()Builds the arguments to pass to weblogic.deploy for undeployment actions ("undeploy" and "delete").voiddeploy()Perform the actual deployment.java.lang.StringgetArguments()Builds the arguments to pass to weblogic.deploy according to the supplied action.protected booleanisActionValid()Determines if the action supplied is valid.voidsetApplication(java.lang.String application)The name of the application being deployed; required.voidsetComponent(java.lang.String component)the component string for the deployment targets; optional.voidsetDebug(boolean debug)If set to true, additional information will be printed during the deployment process; optional.voidvalidateAttributes()Validates the passed in attributes.- 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentToolcreateClasspath, getClasspath, getPassword, getServer, getTask, getUserName, setClasspath, setPassword, setServer, setTask, setUserName
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentToolsetTask
 
- 
 
- 
- 
- 
Method Detail- 
deploypublic void deploy() Perform the actual deployment. For this implementation, a JVM is spawned and the weblogic.deploy tools is executed.- Specified by:
- deployin interface- HotDeploymentTool
- Throws:
- BuildException- if the attributes are invalid or incomplete.
 
 - 
validateAttributespublic void validateAttributes() throws BuildExceptionValidates the passed in attributes.The rules are: - If action is "deploy" or "update" the "application" and "source" attributes must be supplied.
- If action is "delete" or "undeploy" the "application" attribute must be supplied.
 - Specified by:
- validateAttributesin interface- HotDeploymentTool
- Overrides:
- validateAttributesin class- AbstractHotDeploymentTool
- Throws:
- BuildException- if the attributes are invalid or incomplete
 
 - 
getArgumentspublic java.lang.String getArguments() throws BuildExceptionBuilds the arguments to pass to weblogic.deploy according to the supplied action.- Returns:
- A String containing the arguments for the weblogic.deploy tool.
- Throws:
- BuildException- if there is an error.
 
 - 
isActionValidprotected boolean isActionValid() Determines if the action supplied is valid.Valid actions are contained in the static array VALID_ACTIONS - Specified by:
- isActionValidin class- AbstractHotDeploymentTool
- Returns:
- true if the action attribute is valid, false if not.
 
 - 
buildArgsPrefixprotected java.lang.StringBuffer buildArgsPrefix() Builds the prefix arguments to pass to weblogic.deploy. These arguments are generic across all actions.- Returns:
- A StringBuffer containing the prefix arguments. The action-specific build methods will append to this StringBuffer.
 
 - 
buildDeployArgsprotected java.lang.String buildDeployArgs() Builds the arguments to pass to weblogic.deploy for deployment actions ("deploy" and "update").- Returns:
- A String containing the full argument string for weblogic.deploy.
 
 - 
buildUndeployArgsprotected java.lang.String buildUndeployArgs() Builds the arguments to pass to weblogic.deploy for undeployment actions ("undeploy" and "delete").- Returns:
- A String containing the full argument string for weblogic.deploy.
 
 - 
buildListArgsprotected java.lang.String buildListArgs() Builds the arguments to pass to weblogic.deploy for the list action- Returns:
- A String containing the full argument string for weblogic.deploy.
 
 - 
setDebugpublic void setDebug(boolean debug) If set to true, additional information will be printed during the deployment process; optional.- Parameters:
- debug- A boolean representing weblogic.deploy "-debug" flag.
 
 - 
setApplicationpublic void setApplication(java.lang.String application) The name of the application being deployed; required.- Parameters:
- application- A String representing the application portion of the weblogic.deploy command line.
 
 - 
setComponentpublic void setComponent(java.lang.String component) the component string for the deployment targets; optional. It is in the form<component>:<target1>,<target2>...Where component is the archive name (minus the .jar, .ear, .war extension). Targets are the servers where the components will be deployed- Parameters:
- component- A String representing the value of the "-component" argument of the weblogic.deploy command line argument.
 
 
- 
 
-