Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002767 [Resin] feature always 07-03-08 13:04 07-06-08 18:44
Reporter stbu View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.0 Product Version 3.1.6
  Product Build
Summary 0002767: MultiThreaded JspPrecompileListener
Description I have a large number of JSP's and when deploying a new version with an updated .war file, the com.caucho.jsp.JspPrecompileListener is precompiling all the JSP's, but it's only using one thread.

This consumes a lot of time and the startup of the web-app is delayed. It would be nice to have separate threads or instances of this JSP-Precompiler. I've already tried with two listener's but the second one is never doing anything.

This is the structure of the testcase web-app:

$RESIN/webapps/precomp
$RESIN/webapps/precomp/WEB-INF
$RESIN/webapps/precomp/WEB-INF/classes
$RESIN/webapps/precomp/WEB-INF/tmp
$RESIN/webapps/precomp/WEB-INF/work
$RESIN/webapps/precomp/t1
$RESIN/webapps/precomp/t1/sub1
$RESIN/webapps/precomp/t1/sub1/t1_sub1.jsp
$RESIN/webapps/precomp/t2
$RESIN/webapps/precomp/t2/sub2
$RESIN/webapps/precomp/t2/sub2/t2_sub2.jsp


The resin.conf contains this:

      <web-app id="/precomp" root-directory="webapps/precomp">
        <log path='WEB-INF/debug.log' timestamp='[%H:%M:%S.%s] ' format=" ${app.contextPath} ${log.level} ${log.loggerName} ${log.message}">
          <logger name="com.caucho" level="finest"/>
        </log>

        <!-- The first listener, should compile all JSP's in subfolder 't1' -->
        <listener>
          <listener-class>com.caucho.jsp.JspPrecompileListener</listener-class>
          <init>
            <fileset>
              <include>/t1/**/*.jsp</include>
            </fileset>
          </init>
        </listener>

        <!-- The second listener, should compile all JSP's in subfolder 't2' -->
        <listener>
          <listener-class>com.caucho.jsp.JspPrecompileListener</listener-class>
          <init>
            <fileset>
              <include>/t2/**/*.jsp</include>
            </fileset>
          </init>
        </listener>
      </web-app>


But only the first one is working - the WEB-INF/work/_jsp contains only _t1 subfolder with compiled JSP's.


It would be even better, if there would be only one listener with an Init-Param to specify the number of threads for the JSP Precompile, such as:

        <listener>
          <listener-class>com.caucho.jsp.JspPrecompileListener</listener-class>
          <init>
            <compile-threads>3</compile-threads>
            <fileset>
              <include>/t1/**/*.jsp</include>
              <include>/t2/**/*.jsp</include>
            </fileset>
          </init>
        </listener>

Steps To Reproduce
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
07-03-08 13:04 stbu New Issue
07-03-08 13:04 stbu Issue Monitored: stbu
07-06-08 18:44 ferg Assigned To  => ferg
07-06-08 18:44 ferg Status new => closed
07-06-08 18:44 ferg Resolution open => fixed
07-06-08 18:44 ferg Fixed in Version  => 3.2.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker