avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Steuck <greg-avalon-...@nest.cx>
Subject JettySevak: extract-war option
Date Fri, 07 Feb 2003 23:09:50 GMT
Hello,

JettySevak forces web archive extraction for all deployed web
applications.  While this is necessary in some cases, in general it
slows down web application deployment. Most of Jetty's features work
very well right out of web archive file. I feel it would be valuable to
be able to configure this feature.

A small problem with the feature is that it may not apply to other Sevak
implementations, hence I don't see how we could sensibly extend Sevak
role to support the feature on per web application level. So, instead I
propose we add a simple attribute to JettySevak configuration that
turns the feature on and off globally for all deployed webapps.

The patch is included at the bottom (since attachments don't work for
me) and also available at http://home.nest.cx:8/greg/sevak-extract-war-patch

Thanks
Greg

cvs server: Diffing src/java/org/apache/avalon/apps/sevak/blocks/jetty
Index: src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak-schema.xml
===================================================================
RCS file: /home/cvspublic/avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak-schema.xml,v
retrieving revision 1.1
diff -u -r1.1 JettySevak-schema.xml
--- src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak-schema.xml	6 Feb 2003 16:43:46
-0000	1.1
+++ src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak-schema.xml	7 Feb 2003 23:06:38
-0000
@@ -17,5 +17,8 @@
         <optional>
             <element name="maxthreads"><data type="integer"/></element>
         </optional>
+        <optional>
+            <element name="extract-war"><data type="boolean"/></element>
+        </optional>
     </interleave>
 </element>
Index: src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java
===================================================================
RCS file: /home/cvspublic/avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java,v
retrieving revision 1.14
diff -u -r1.14 JettySevak.java
--- src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java	6 Feb 2003 16:43:46
-0000	1.14
+++ src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java	7 Feb 2003 23:06:38
-0000
@@ -101,6 +101,7 @@
     private int m_port;
     private int m_minThreads;
     private int m_maxThreads;
+    private boolean m_extractWebArchive;
     private File m_sarRootDir;
     private ServiceManager m_serviceManager;
 
@@ -137,6 +138,7 @@
         m_port = configuration.getChild( "port" ).getValueAsInteger( 8080 );
         m_minThreads = configuration.getChild( "minthreads" ).getValueAsInteger( 5 );
         m_maxThreads = configuration.getChild( "maxthreads" ).getValueAsInteger( 250 );
+        m_extractWebArchive = configuration.getChild("extract-war").getValueAsBoolean(true);
 
         if( m_maxThreads < m_minThreads )
         {
@@ -232,7 +234,7 @@
                 getLogger().info( "deploying context=" + context + ", webapp=" + webAppURL
                                   + " to host=" + ( m_hostName == null ? "(All Hosts)" :
m_hostName ) );
 
-            ctx.setExtractWAR( true );
+            ctx.setExtractWAR( m_extractWebArchive );
             m_webapps.put( context, ctx );
             ctx.start();
         }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message