[
https://issues.jboss.org/browse/JBAS-8786?page=com.atlassian.jira.plugin....
]
Elias Ross commented on JBAS-8786:
----------------------------------
Using the attached example, this patch prevents JBoss from unpacking all the .jar files.
The example works.
Index: src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java (revision 110975)
+++ src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java (working copy)
@@ -122,6 +122,10 @@
public abstract class AbstractWarDeployer extends
AbstractSimpleRealDeployer<JBossWebMetaData>
implements ManagedObjectCreator
{
+ static {
+ System.err.println("*** AbstractWarDeployer patched");
+ }
+
public static final String DEPLOYER =
"org.jboss.web.AbstractWebContainer.deployer";
public static final String WEB_APP =
"org.jboss.web.AbstractWebContainer.webApp";
public static final String WEB_MODULE =
"org.jboss.web.AbstractWebContainer.webModule";
@@ -842,14 +846,18 @@
* DeclaredStructure deployer correctly support exploding WARs.
*/
private URL getExplodedWarUrl(VirtualFile virtualFile) throws MalformedURLException,
IOException {
+ log.debug("getExplodedWarUrl " + virtualFile);
if(virtualFile.isDirectory())
{
+ /*
+ log.error("isDirectory " + virtualFile);
VirtualFileVisitor visitor = new VirtualFileVisitor()
{
public void visit(VirtualFile virtualFile)
{
try
{
+ log.error("visit " + virtualFile);
virtualFile.getPhysicalFile();
}
catch (IOException e)
@@ -864,6 +872,7 @@
}
};
virtualFile.visit(visitor);
+ */
return virtualFile.getPhysicalFile().toURI().toURL();
}
return virtualFile.toURL();
This was applied to the tagged 6.0.0.Final version.
Use the attached jboss-as-server.jar and copy to $JBOSS_HOME/common/lib/jboss.jar
JBoss unpacks all jars from WEB-INF\lib of war file
---------------------------------------------------
Key: JBAS-8786
URL:
https://issues.jboss.org/browse/JBAS-8786
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Deployers, Web (Tomcat) service
Affects Versions: 6.0.0.Final
Environment: Windows XP x32
Reporter: Maxym Pendyshchuk
Assignee: John Bailey
Fix For: 6.1.0
Attachments: jarbomb.zip
while starting JBoss AS it unpacks all jar files, which are located in WEB-INF/lib folder
of each my war file. It means that in tmp folder mostly I see folder with jar file, and
folder with its content. 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"
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 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.
the problem is that it slows down application server booting (when I repack all my war
files as ear and moved war libraries to ear/lib folder then I save 2+ minutes at JBoss 6
booting...). If it is done deliberately (so it improves some performance at runtime), then
would be nice to have a configuration option, so during development I can save time to
boot my local JBoss AS
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira