Jboss load package order

tags: JBoss  XML  AOP  REST  Access

After testing, the order of loading the ear package is loaded according to the order of the first letter of the package name. If the package call package occurs during the loading process, it is necessary to pay attention to the problem caused by the package name.

Question: What is the loading order of packages with different suffixes?

What is the loading order of the jar and war packages in the ear package?

What is the loading order of the class files and other files in the package?

 

to be continued. . . .

 

 

Answer to the question:

 

1. What is the loading order of the packages with different suffixes?

A: Turn:

 

 

The version mentioned below is jboss-4.2.3.GA

And suppose JBoss is installed at D:\Java\jboss-4.2.3.GA

JBoss supports a variety of formats to support the package, for example, we will see the suffix from the deploy directory as deployer, sar, war, rar, xml ... (later found that the format of JBoss deployment support, far not only these)

But what is the loading order of these different format applications? Or is there any law? With this question, I carefully looked at the information in the command line when JBoss started, and found two pieces of information:

1. The first application is the application or service with the suffix named deployer directory;

2. Each time an application with the same suffix (or an application under the directory) is completely loaded, it will load another suffix name.

After discovering these two points, I found some configuration files of JBoss, which were originally in D:\Java\jboss-4.2.3.GA\server\default\conf\xmdesc org.jboss.deployment.MainDeployer-xmbean.xml There is such a paragraph in the file:

 

 

 

<attribute access='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:.  ,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>  
         <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 have a sequential order, we can do it in two ways.
1. Deploy to different subdirectories according to actual needs
2, change the JBoss default loading order by modifying the following value

 

<descriptors>  
     <value value="250:.rar,300:-ds.xml,400:.jar,500:.war,550:.jse,650:.ear,800:.bsh"/>  
</descriptors>  

 

 

 

 

Question 2: What is the loading order of the jar and war packages in the ear package?

A: After testing, the package loading order in the ear package is also loaded in the order set by the org.jboss.deployment.MainDeployer-xmbean.xml file.

 

Intelligent Recommendation

Log4j custom package log under Jboss

Log4j.xml log4j.properties...

JBOSS introduces an external jar package and reports an error

Recently, a project needs to implement asymmetric encryption and decryption functions, so the class org.bouncycastle.jce.provider.BouncyCastleProvider provided by Java is used, and the jar package bcp...

Solve the conflict between the smartson jackson package and the jBoss (wildfly) jackson package

When the java web project is first released on jboss, it will encounter the smartson jackson package and the jboss jackson package because the version conflicts, causing the release to fail. My error ...

Nginx 1.2.1 + JBOSS AS 7 load configuration and session processing.

Recent projects use JBOSS AS7 as the middleware for the default application, while the production environment is load balanced. A close look at the official JBOSS documentation, found that the origina...

How to Configure Tomcat/JBoss and Apache HTTPD for Load Balancing and Failover

http://java.dzone.com/articles/how-configure-tomcatjboss-and In this post we will see how to setup a load balanced JBoss or Tomcat environment with the fail-over capability. This post assumes that bot...

More Recommendation

How does JBoss Drools dynamically load and update rules?

JBoss Drools provides a class KieScanner, which can support dynamic loading and updating of rules from Maven repository. The official examples did not prove this ability well. After several days of re...

IDEA creates a new Java Web project and releases the war package to Jboss

(1) Development environment JDK:1.8 IDEA:IntelliJ IDEA 2017.2.3 Jboss:jboss-4.2.3.GA (2) New construction The structure of the project directory after the new construction is completed is as follows: ...

Use log4j log that jboss eap 6.2 ear package

Gaosi log problem jboss7 / eap's, and checked a lot of information, is the war package, basically using jboss-deployment-structure.xml put under WEB-INF, document reads as follows:   I was not al...

Reproduce the JBOSS remote deployment war package (process, steps, instructions)

lab environment: A windows server 2003 target machine with jboss environment configured An attack host with phpstudy Experiment description: Two hosts can ping each other Experimental steps: First ope...

jboss remote connection and unauthorized remote upload and access to war package

1: If jboss cannot be started, configure a jboss system in the environment variable variable. After jboss is configured, it is generally not accessible from outside by default, and the connection will...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top