JTA Integration
Chapter 8. Application Deployment
C. Redeploy by deleting the marker file
As described in Section 8.4.5, “Reference for Deployment Scanner Marker Files”, deleting a deployed application's .deployed marker file will trigger an undeployment and create an .undeployed marker. Deleting the undeployment marker will trigger the deployment cycle again.
Refer to Section 8.4.3, “Undeploy an Application to a Standalone Server Instance with the Deployment Scanner” for further information.
Result
The application file is redeployed.
Report a bug
8.4 .5. Reference for Deployment Scanner Marker Files
Marker files
Marker files are a part of the deployment scanner subsystem. These files mark the status of an
application within the deployment directory of the standalone server instance. A marker file has the same name as the application, with the file suffix indicating the state of the application's deployment. The following table defines the types and responses for each marker file.
Example 8.4 . Marker file example
The following example shows the marker file for a successfully deployed instance of an application called testapplication.war.
testapplication.war.deployed
Table 8.1. Marker filetype definitions
Filename Suffix Origin Description
.dodeploy User generated Indicates that the content should be deployed or redeployed into the runtime.
.skipdeploy User generated Disables auto-deploy of an application while present. Useful as a method of temporarily blocking the auto-deployment of exploded content, preventing the risk of incomplete content edits pushing live. Can be used with zipped content, although the scanner detects in-progress changes to zipped content and waits until completion.
.isdeploying System generated Indicates the initiation of deployment. The marker file will be deleted when the deployment process completes.
.deployed System generated Indicates that the content has been deployed. The content will be undeployed if this file is deleted.
.failed System generated Indicates deployment failure. The marker file contains information about the cause of failure. If the marker file is deleted, the content will be visible to the auto-deployment again.
.isundeployin g
System generated Indicates a response to a .deployed file deletion. The content will be undeployed and the marker will be automatically deleted upon completion.
.undeployed System generated Indicates that the content has been undeployed. Deletion of the marker file has no impact to content redeployment.
.pending System generated Indicates that deployment instructions will be sent to the server pending resolution of a detected issue. This marker serves as a global deployment road-block. The scanner will not instruct the server to deploy or undeploy any other content while this condition exists.
Report a bug
8.4 .6. Reference for Deployment Scanner Attributes
The deployment scanner contains the following attributes that are exposed to the Management CLI and able to be configured using the write-attribute operation. For more information on configuration options, refer to the topic Section 8.4.8, “Configure the Deployment Scanner with the Management CLI”.
Table 8.2. Deployment Scanner Attributes
Name Description Type default
Value auto-deploy-exploded Allows the automatic deployment of
exploded content without requiring a .dodeploy marker file. Recommended for only basic development scenarios to prevent exploded application deployment from occurring during changes by the developer or operating system.
Boolean False
auto-deploy-xm l Allows the automatic deployment of XML content without requiring a .dodeploy marker file.
Boolean True
auto-deploy-zipped Allows the automatic deployment of zipped content without requiring a .dodeploy marker file.
Boolean True
deploym ent-tim eout The time value in seconds for the
deployment scanner to allow a deployment attempt before being cancelled.
Long 60
path Defines the actual filesystem path to be scanned. If the relative-to attribute is specified, the path value acts as a relative addition to that directory or path.
String Deployment s
relative-to Reference to a filesystem path defined in the paths section of the server
configuration XML file.
String jboss.serve r.base.dir
scan-enabled Allows the automatic scanning for applications by scan-interval and at startup.
Boolean True
scan-interval The time interval in milliseconds between scans of the repository. A value of less than 1 restricts the scanner to operate only at startup.
Int 5000
Report a bug
8.4 .7. Configure the Deployment Scanner
The deployment scanner can be configured using the Management Console or the Management CLI.
You can create a new deployment scanner or manage the existing scanner attributes. These include the scanning interval, the location of the deployment folder, and the application file types that will trigger a deployment.
Report a bug
8.4 .8. Configure the Deployment Scanner with the Management CLI
Prerequisites
Section 3.3.2, “Launch the Management CLI”
Summary
While there are multiple methods of configuring the deployment scanner, the Management CLI can be used to expose and modify the attributes by use of batch scripts or in real time. You can modify the behaviour of the deployment scanner by use of the read-attribute and write-attribute global command line operations. Further information about the deployment scanner attributes are defined in the topic Section 8.4.6, “Reference for Deployment Scanner Attributes”.
The deployment scanner is a subsystem of JBoss Enterprise Application Platform 6, and can be viewed in the standalone.xml.
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir"
scan-interval="5000"/>
</subsystem>
Procedure 8.10. Task
1. Determine the deployment scanner attributes to configure
Configuring the deployment scanner via the Management CLI requires that you first expose the correct attribute names. You can do this with the read-resources operation at either the root node, or by using the cd command to change into the subsystem child node. You can also display the attributes with the ls command at this level.
A. Expose the deployment scanner attributes with the read-resource operation