Jboss: Configuring the Deployment directory for your app

Source: Internet
Author: User
Tags manual relative xmlns jboss

By default, JBOSS looks for the app and deploys it from the Jboss_home/standalone/deployments directory.

This information is configured in the Jboss_home/standalone/configuration/standalone.xml file to find

<subsystem xmlns= "urn:jboss:domain:deployment-scanner:1.0" >
In this file, it already exists a <deployment-scanner>Child node, which configures the server to find the app to deploy under the deployments directory relative to Jboss.server.base.dir, as follows:

<subsystem xmlns= "urn:jboss:domain:deployment-scanner:1.0" >  
    <deployment-scanner scan-interval= "5000 "Relative-to=" Jboss.server.base.dir "path=" deployments "/>    
</subsystem>

This default configuration indicates that, in the deployments directory relative to the system variable Jboss.server.base.dir, the lookup app is deployed, scanned every 5 seconds.

Scanner also has some other configuration properties:


For example, our unit's path configuration for JBoss is this:

<subsystem xmlns= "urn:jboss:domain:deployment-scanner:1.1" >
	<deployment-scanner path= "." Relative-to = "Jboss.server.base.dir" auto-deploy-zipped= "false" auto-deploy-exploded= "false" Auto-deploy-xml= "false"/>
</subsystem>

Meaning I will not parse, the figure explained very clearly.

In addition, if you want to add additional deployment directories, you can add new Deployment-scanner, such as/home/me/as7/mydeployments as my deployment directory, with the following configuration:

<subsystem xmlns= "urn:jboss:domain:deployment-scanner:1.0" >  
    <deployment-scanner scan-interval= "5000 "Relative-to=" Jboss.server.base.dir "path=" deployments "/>  
    <deployment-scanner name=" My-external-deployment-scanner "path="/home/jpai/as7/deployments "scan-interval="/> </subsystem  
>


Here are some of the processes that describe the JBoss deployment:

Users can place the deployment content (War, ear, jar, SAR, etc.) in the Standalone/deployments directory, and the JBoss runtime is automatically deployed to the server, which is often used in development.
Deployment mode:
1. Automatic deployment:
The scanner directly monitors the deployment content and automatically deploys new content. Content related to Automatic deployment in Standalone.xml:
<subsystem xmlns= "urn:jboss:domain:deployment-scanner:1.1" >
<deployment-scanner path= "Deployments" relative-to= "Jboss.server.base.dir" scan-interval= "the"/>
</subsystem>
As you can see from the above configuration, JBoss will scan the deployments directory every 5 seconds (when JBoss is running in standalone mode), you can also change the path of the automatic scan to another location, and you can also configure multiple paths for automatic scanning.
As a result, you only need to put the project package in the scanned directory, then the system will be automatically deployed, after deployment, will generate a content of ***.war ***.war.deployed file
The project will be deployed with the following types of markup files:
The tag file has the same name as the associated deployment content, except for a suffix name appended to it. Different suffix names indicate different meanings.
. Dodeploy is placed by the user, indicating that the content should be deployed or redeployed to the runtime
. Skipdeploy disable automatic deployment As long as this file exists.
The. isdeploying Deployment Scan Service placement indicates that it has noticed one. The Dodeploy file, which is in the process of deploying content, is automatically deleted when the deployment is complete.
The. Deployed Deployment Scan Service placement indicates that the content has been deployed to the runtime, and if deleting this file will undeploy.
. Failed deployment scan service placement, indicating that the deployment failed,
The. isundeploying Deployment Scan Service placement indicates that it has noticed that a. deployed file has been deleted and is canceling the deployment content. This file will also be deleted when the execution is complete.
The. undeployed Deployment Scan Service placement indicates that the content has been deleted by the village runtime, and if the user deletes the file, it will not affect in manual mode, and the automatic mode is redeployed.
The. Pending Deployment Scan Service placement indicates that it has noticed that the content is being deployed, but has not yet notified the server to deploy it, and if the scanner detects that some of the automatic deployment content is still in the process of copying, or there are some problems preventing automatic deployment, this file will be created. As long as this condition is true, the scanner does not notify the server to deploy or undeploy any content.
2. Manual deployment:
You can deploy a new project by manually creating a file yourself, such as:
Copy a Test.war project package to the deployment directory, and then manually create a file with the Test.war file name test.war.deployed, after which the address can be accessed http://127.0.0.1/test
You can also copy an expanded item to the deployment directory, However, to ensure that the project directory name suffix is a file directory such as. war, such as: Expand the Test.war project to the test directory, you need to copy the test directory to the deployment directory, and change the name to Test.war, and then create a file content of Test.war TEST.WAR.D eployed files are available.

ref:http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.as/ Jboss-as-deployment-scanner/7.1.3.final/org/jboss/as/server/deployment/scanner/localdescriptions_zh_ Cn.properties

Https://developer.jboss.org/wiki/DeployingAnApplicationFromAnExternalDeploymentLocation

Https://docs.jboss.org/author/display/AS7/Deployment+Scanner+configuration

http://www.minunix.com/2013/08/jboss-as7-01/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.