*
The moose likes JBoss/WildFly and the fly likes Purpose of different Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
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: 45

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
Ifteqar Ald
Ranch Hand

Joined: Dec 26, 2011
Posts: 73
/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: 45

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
Marshal

Joined: Jul 20, 2005
Posts: 10068
    
163

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: 45

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.
 
Consider Paul's rocket mass heater.
 
subject: Purpose of different "lib" in JBoss 5