After testing, the order in which the ear packages are loaded is loaded according to the order of the first letter of the package name, so pay attention to the problem caused by the package name if the package invocation package occurs during the loading process.
Question: What is the order of loading for packages with different suffixes?
What is the order of the jar packages and war packages within the ear package.
The order in which the class files and other files in the package are loaded.
Cond....
For answers to questions:
1, the different suffix of the package load sequence is how.
A: Turn: http://tanyankai.javaeye.com/blog/569627
The version mentioned below is Jboss-4.2.3.ga
And assume that JBoss is installed in D:/java/jboss-4.2.3.ga
JBoss deployment supports a variety of formats for the package, for example, we will see from the Deploy directory suffix named Deployer, sar,war,rar,xml ... (later found that the JBoss deployment of the support format, far more than these)
But what is the load sequence of the applications of these different formats? Or if there are any rules. With this question I took a closer look at the information on the command line when JBoss started, and found two messages:
1, the first load is the suffix named Deployer directory of applications or services;
2, each will wait for the same suffix name of the application (or the application under the directory) completely loaded before will go to load another suffix name
After discovering these two points, I looked for some of JBoss's configuration files, originally in D:/java/jboss-4.2.3.ga/server/default/conf/xmdesc The Org.jboss.deployment.maindeployer-xmbean.xml file contains a paragraph that reads:
XML code<attributeaccess= ' read-write ' setmethod= ' setenhancedsuffixorder ' getmethod= ' Getenhancedsuffixorder '><description>Allows the override of the suffix order declared by subdeployers, using the syntax [Order:]suffix</description> <name>Enhancedsuffixorder</name><type>[Ljava.lang.String;</type> <!-- Statically set one or more enhanced Suffix orders, independent of the value proposed by subdeployers. Some deployers may also allow the suffixes/orders to be set locally, so That ' s preferable too. for reference, this is the list of enhanced suffixes likely to be set by deployers (it may not be completely up-to-date, or there can be user-defined deployers) . 050:.deployer, 050:-DEPLOYER.XML,100:.AOP,100:-AOP.XML,150:.SAR,150:-SERVICE.XML,200:.&NBSP;&NBSP;,250:.RAR,300:-DS.XML,350:. har,400:.jar,400:.ejb3,400:.par,500:.war,600:.wsr,650:.ear,700:.jar,750:.zip,800:.bsh,900:.last until we resolve some startup issues, we ' ll setup some static enhanced suffix orders bellow and leave the rest of the suffixes contributed dynamically by registering deployers. -- ><descriptors><valueValue= "250:.RAR,300:-DS.XML,400:.JAR,500:.WAR,550:.JSE,650:.EAR,800:.BSH"/></descriptors></attribute>
<attribute access= ' read-write ' setmethod= ' setenhancedsuffixorder ' getmethod= ' Getenhancedsuffixorder ' > <de Scription>allows the override of the suffix order declared by subdeployers, using the syntax [Order:]suffix &L T;/description> <name>EnhancedSuffixOrder</name> <TYPE>[LJAVA.LANG.STRING;</TYPE&G
T
<!--statically set one or more enhanced suffix orders, independent of the value proposed by Subdeployers.
Some Deployers may also allow of the suffixes/orders to being set locally, so that ' s preferable too. For reference, this is the ' list of enhanced suffixes likely to being set by Deployers ' (it may isn't be completely u
P-to-date, or there can be user-defined deployers). 050:.DEPLOYER,050:-DEPLOYER.XML,100:.AOP,100:-AOP.XML,150:.SAR,150:-SERVICE.XML,200:. , 250:.rar,300:-ds.xml,350:.har,400:.jar,400:.ejb3,400:.par,500:.war,600:.wsr,650:.ear,700:.jar,750:.zip,800:.bsh,900:.last Until We resolve some startup issues, we ll setup some static enhanced
Suffix orders bellow and leave the rest of the suffixes contributed dynamically by registering. --> <descriptors> <value value= "250:.rar,300:-ds.xml,400:.jar,500:.war,550:.jse,650:
. Ear,800:.bsh "/> </descriptors> </attribute>
If we need to deploy a lot of applications under JBoss, and sometimes these applications need to be in a sequential order, we can do this in two ways.
1, according to the actual needs, deployment to different subdirectories below
2, by modifying the following value to change the JBoss default load sequence
Java code <descriptors> <value value= "250:.RAR,300:-DS.XML,400:.JAR,500:.WAR,550:.JSE,650:.EAR,800:.BSH" /> </descriptors>
<descriptors>
<value value= "250:.RAR,300:-DS.XML,400:.JAR,500:.WAR,550:.JSE,650:.EAR,800:.BSH"/ >
</descriptors>
The problem 2:ear the jar package in the package and the load order of the war package.
A: After testing, the order in which the packages are loaded in the ear package is also loaded according to the order in which the Org.jboss.deployment.maindeployer-xmbean.xml file is set.