Reputation: 2209
I'm packaging my app as WAR archive. What are pros/cons of these two approaches:
Is there any performance/security difference? I'm using GlassFish 3.1.1 WebProfile
Upvotes: 2
Views: 163
Reputation: 1108802
There is really no performance/security difference for JARs in /WEB-INF/lib
versus classes in /WEB-INF/classes
. They end up in the same context and classloader anyway. Perhaps extracting the JAR and loading its classes into memory needs a few milliseconds more, but that's totally negligible.
Only maintainability and reusability is different here. When you put EJBs in a separate project, then you can more easily reuse them for other WARs and purposes without the need to copypaste classes.
Upvotes: 3