aspose file tools*
The moose likes JBoss/WildFly and the fly likes Order of loading jar from “jboss5.1 /server/default/lib” Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Order of loading jar from “jboss5.1 /server/default/lib”" Watch "Order of loading jar from “jboss5.1 /server/default/lib”" New topic
Author

Order of loading jar from “jboss5.1 /server/default/lib”

NarendraR Chouhan
Greenhorn

Joined: Mar 24, 2011
Posts: 2
In my application there is a scenario where I have to provide patches in the production as a jar (hot patch). So in this case if 2 or 3 jar provided as a hot patch, now the issue is. These jars should be loading in the sequence location of jar is “jboss /server/default/lib”

How to control the jar loading order or how JBOSS 5.1 loads (order) jar from the “jboss /server/default/lib”
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

NarendraR, welcome to Java Ranch!

If you have patched JAR files, place them into a separate directory, such as jboss_home/common/patch, and then add "--patchdir=/full/path/to/jboss/common/patch". Then the patches will take precedence to the other JARs. Run the run script with --help for details.


JBoss In Action
NarendraR Chouhan
Greenhorn

Joined: Mar 24, 2011
Posts: 2
Thanks Peter for the reply.

But thing is that I don’t allow to change any script (run.bat/run.sh etc) for the deployment on the production, but I can crate new folder for placing the patch.jar. and one more thing I may have multiple patches, and sequence of loading jar matters for that. So is there any other ways to archive it.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I wasn't very clear, the --patchdir is not a change to the run script. Instead, you add it to the command line. Example:

run --patchdir=xxxx ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Order of loading jar from “jboss5.1 /server/default/lib”