JBoss Community

Re: How to make libs.jar accessible to both EJBs and WebApp?

created by markorocko in JBoss AS 7 Development - View the full discussion

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.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community