There is no ordering of jars as each is deployed with a seperate class loader.
Do you have classes in one jar that need to be overriden by another? The
only solution is to use a single class loader in any context that allows
multiple library jars to be specified so that the specified order is preserved.
The issue is not the HashSet used in parseXMLClasspath as each jar
is added to the class loader repository which is also unordered.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 1:34 AM
Subject: [JBoss-dev] SARDeployer strange ordering of archives


> Anybody notice the strange ordering of archives from an MBean.
> 
> I plugged in an MBean in the user-service.xml file.
> And the MBean depended on multiple jar files. So I added them into the archive
> attribute of the classpath stanza in the xml file.
> 
> The order in which the jars get deployed did not match the order in which I
> listed them, but this didn't cause any problems
> 
> However when I deployed to another machine the order changed and the jar files
> were not loaded in the correct order which meant that Classpath issues arose
> and the MBean would no longer work.
> 
> No matter how I reorder the archive list the order in which jars get deployed
> never changed.
> 
> I got the latest jboss-all.tar.gz nightly cvs snapshot and 
> I looked at the code and found that in the system module in the class  
>org.jboss.deployment.SARDeployer
> 
> method parseXMLClasspath on line 292 
> This method parses the Classpath element. But it adds each archive to a HashSet.
> Then iterates over the elements in the HashSet and deploys them. 
> Changing the HashSet to an java.util.ArrayList or java.util.Vector solves this
> problem and retains the deployment order given by the archive list.
> 
> I wonder is there a particular need for the use of a HashSet.
> 
> I also wonder why the SAR Deployer reparses the XML file when in
> jmx packages there is existing code to do this.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to