-
1. Re: How to make libs.jar accessible to both EJBs and WebApp?
swd847 Aug 28, 2012 4:59 PM (in response to markorocko)Place libs.jar in EAR/lib, and then it will be visible to all your wars and EJB jars (this is part of the EE6 standard).
-
2. Re: How to make libs.jar accessible to both EJBs and WebApp?
markorocko Aug 29, 2012 11:12 AM (in response to swd847)Yes, thanks!
How to Package EARs and WARs
When you migrate your application, you may have to change the packaging structure of your EAR or WAR due to the class loading changes.
A WAR is a single module and all classes in the WAR are loaded with the same class loader. This means classes packaged in the WEB-INF/lib are treated the same as classes in WEB-INF/classes.
An EAR is different in that it consists of multiple modules. The EAR/lib directory is a single module, and every WAR or EJB jar deployment is also a separate module. Classes will not necessarily have access to other classes in the EAR unless explicit dependencies have been defined.
For more information on EAR and WAR packaging, see "WAR Class Loading" and "EAR Class Loading" in Class Loading in AS7.