JBoss 6 unpacks jars from WEB-INF/lib of war
when I start JBoss 6 I see that it unpacks all jar files from WEB-INF/lib in tmp/vfs/automountXXX folder. E.g. jackrabbit-server.war contains library asm-3.1.jar, then in tmp folder I see the following folders with files:
asm-3.1.jar-83dc35ead0d41d41/asm-3.1.jar
asm-3.1.jar-2a48f1c13ec7f25d/contents/"unpacked asm-3.1.jar"
it does not take files from my.ear/lib only WEB-INF/lib... Why is it so? And is here any way to prevent it doing so? It just slows down application server starting (and stopping), what is not that comfortable at development... btw. repacking war to ear structure that way, gave me the same working application and saved 1 minute while application server starts... 1 minute is good enough... I hope there is simpler way, wihtout repacking in development mode.
If it is somehow related to JavaEE 6 specification and ejb-jars, which can be located now in WEB-INF/lib, so I don't have such libraries in my war files...
UPDATE: actually when I repack jackrabbit-server.war to jackrabbit-server.ear which contains jackrabbit-server.war and moved all its libraries to jackrabbit-server.ear/lib then I still see two folders in tmp:
asm-3.1.jar-215a36131ebb088e/asm-3.1.jar
asm-3.1.jar-14695f157664f00/contents/
but in this case 开发者_C百科last folder is empty. So it still creates two folders, but does not unpack my library. Also I use exploded deployment so the question is only about jar files, not unpacking ear/war.
It will be unpacking EARs also, just not in the same place. You'll have to hunt around to find where they get unpacked, but they are there.
It does this for performance reasons. If it didn't, then classloading would be extremely slow, since it would have to recurse through nested ZIP files looking for what it needs.
So you may feel that the unpacking slows you down, but it's actually making things faster.
According to discussion on JBoss AS Forum it can be a bug. And there is no workaround to fix/avoid/configure it now.
The only idea I got was to repack my applications: inside EAR I moved libraries from WEB-INF\lib of WAR to EAR\lib (only struts was left in WAR, otherwise it won't work), and another WAR application I made as EAR and all its libraries I could move to EAR\lib. In development mode I can easy use this structure, and it saves me 2+ minutes to boot application server and that's a lot... Now JBoss takes 1:50 minutes to start, in comparing to 4 minutes before...
精彩评论