File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss and the fly likes Purpose of different Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "Purpose of different "lib" in JBoss 5" Watch "Purpose of different "lib" in JBoss 5" New topic
Author

Purpose of different "lib" in JBoss 5

rastogi payam
Ranch Hand

Joined: May 09, 2011
Posts: 40

Hi All,

There are three different "lib" folders in JBoss 5
1. /jboss-5.1.0.GA/lib
2. /jboss-5.1.0.GA/server/default/lib
3. /jboss-5.1.0.GA/server/default/deploy/myapp1.war/WEB-INF/lib

Can anyone please explain me the purpose of these three different "lib" folders and in which order and priority the Jars present in these folders are loaded?
and What happen if the same jar with different version is present in all the three "lib" folders and it is also used by our myapp.war and which will be given more priority.

Thanks


SCJP 1.6, OCPWCD 5
saahil gupta
Ranch Hand

Joined: Dec 26, 2011
Posts: 56
/jboss-5.1.0.GA/lib contains library file. You Should not change the contents in this Directory. These are Jar Files used by Jboss to Provide Services
/jboss-5.1.0.GA/server/default/lib contains dependent jar files needed by the files under /jboss-5.1.0.GA/server/default/deploy/
/jboss-5.1.0.GA/server/default/deploy/myapp1.war/WEB-INF/lib Contains lib Files used by your Application
rastogi payam
Ranch Hand

Joined: May 09, 2011
Posts: 40

Thanks Saahil for the reply but still some of my questions are unanswered like in which order and priority the Jars present in these folders are loaded?
and What happen if the same jar with different version is present in all the three "lib" folders and it is also used by our myapp.war and which will be given more priority.

Thanks
Jaikiran Pai
Saloon Keeper

Joined: Jul 20, 2005
Posts: 6720

See http://community.jboss.org/wiki/JBossClassLoadingUseCases and http://community.jboss.org/wiki/classloadingconfiguration


[My Blog] [JavaRanch Journal]
rastogi payam
Ranch Hand

Joined: May 09, 2011
Posts: 40

thanks Jaikiran for the reply ...I have one more question that how can we make a deployement scoped and non scoped in JBOSS. I got these terms (scoped and non-scoped) from the link itself.
 
 
subject: Purpose of different "lib" in JBoss 5
 
Threads others viewed
package javax.ejb does not exist
Best packaging and deployment strategy for web applications
jboss not starting - config issue?
JBOSS and Mysql
Problem not loading a properties file
developer file tools