aspose file tools*
The moose likes JBoss/WildFly and the fly likes Common jars with multiple ears Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Common jars with multiple ears" Watch "Common jars with multiple ears" New topic
Author

Common jars with multiple ears

chicha sonu
Greenhorn

Joined: Sep 15, 2013
Posts: 29
Hi,

I have two Ears
MyApp1.ear
--MyApp1.war
--WEB-INF
--classes
--abc.properties
--def.properties
--META-INF
--Application.xml
--MANIFEST.MF



MyApp2.ear
--MyApp2.war
--WEB-INF
--classes
--xyz.properties
--ghi.properties
--META-INF
--Application.xml
--MANIFEST.MF




Both my ears need some common jars like
log4j.jar
common-beanunitls.jar
commons-lang.jar
commons-logging.jar
quartz.jar
emorphz.jar
itext.jar
bcmail-pro.jar
jasper-fonts.jar


If i pleace all the above required jars in my ear ,my ear size would grow big in size.
Earlier i used to deploy in Jboss 4.x and JBoss 5.1 where i userd to place all the requires jars as well as application relation proerty files in $JBOSS_HOME/profile/lib/


I am newbie to JBOSS-AS 7.1


Could someoneplease help me out with this.....


Thanks in advance..
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2854
    
  11

Hi, and welcome to Java Ranch!

I'm not the big JBoss expert around here, but I believe modules are the new concept that replaces lib jars. Some of the jars you listed are included as modules out of the box, and at most you will just have to update the extensions section your standalone.xml configuration file (if you are running a single server). For the others, you can create your own modules.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10207
    
166

Greg is correct, JBoss AS7 and WildFly (the new name of JBoss AS) uses module classloaders. By default, some modules are shipped out of the box. If you have some specific jars that you want to share between applications then you can create a module for it and add a dependency on that module from your application.

See the documentation here for details:

https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7
https://docs.jboss.org/author/display/MODULES/Home

[My Blog] [JavaRanch Journal]
 
Consider Paul's rocket mass heater.
 
subject: Common jars with multiple ears