tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@voyager.apg.more.net>
Subject Re: [PROPOSAL] jasper2 detection of compile time page include changes
Date Thu, 25 Apr 2002 09:34:30 GMT
Thats a good suggestion, I will add that to the proposal.

Thanks,

Glenn

Petr Jiricka wrote:
> 
> I also like the idea, however I would like to see some modifications
> which would allow this idea to work for application development, not
> only in deployment environments.
> 
> When developing applications, the requirement is to see the changes
> immediately, not after a period of time. So there should be an option to
> run the check on each request (the option can be implemented as an init
> parameter of JSPServlet). This option would be used in a development
> case, and the background thread solution would be used in the live
> deployment scenario. Note that in the former case, not all files in the
> application need to be checked, only the ones included in the currently
> requested page.
> 
> Petr Jiricka
> software engineer
> NetBeans / Forte for Java
> Sun Microsystems
> 
> Kin-Man Chung wrote:
> 
> > +1 on the idea.
> >
> > With minor changes, we can also implement a compiler server that compiles
> > out-of-date pages in the background thread.  This would greatly improve
> > the response time for accessing the pages, when recompilations are needed.
> >
> >
> >>Date: Wed, 24 Apr 2002 10:52:51 -0500
> >>From: Glenn Nielsen <glenn@voyager.apg.more.net>
> >>Subject: [PROPOSAL] jasper2 detection of compile time page include changes
> >>To: tomcat-dev@jakarta.apache.org
> >>MIME-version: 1.0
> >>Content-transfer-encoding: 7bit
> >>X-Accept-Language: en
> >>Delivered-to: mailing list tomcat-dev@jakarta.apache.org
> >>Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> >>X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> >>List-Post: <mailto:tomcat-dev@jakarta.apache.org>
> >>List-Subscribe: <mailto:tomcat-dev-subscribe@jakarta.apache.org>
> >>List-Unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> >>List-Help: <mailto:tomcat-dev-help@jakarta.apache.org>
> >>List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org>
> >>
> >>A common problem Tomcat users have is that Jasper does not detect when
> >>a compile time included file <%@include file="..."%> changes so that
> >>it can recompile dependent JSP pages.  This propsoal maps out a possible
> >>solution for this.
> >>
> >>Create a new class (JspDependency) which is used to store mapping of JSP
> >>pages to dependent compile time included files.  This class will be
> >>created for each web application context and the data it depends upon
> >>serialized to a special file in the work directory on context stop,
> >>and read from that file on context startup.  Proposed filename is
> >>JSP_DEPENDENCY.ser.
> >>
> >>Here is how this integrates into Jasper:
> >>
> >>On context start instantiate a JspDependency object and read in the
> >>dependencies from JSP_DEPENDENCY.ser.  If there are dependencies,
> >>start a background thread which checks for changes in compile time
> >>included files once each 5-15 minutes. Perhaps make this configurable.
> >>If changes are detected, set flags for dependent JSP pages which are
> >>affected.  Using a thread to accomplish this rather than having JSP
> >>Load do the dependency checks should reduce the request latency
> >>overhead for detecting these changes.
> >>
> >>The JSP Load method will call a method in JspDependency to determine
> >>whether the current page needs to be recompiled due to dependency changes.
> >>This will just be a quick test of a boolean, actual dependency checks
> >>are done by the background thread.
> >>
> >>The JSP page compiler will call a method in JspDependency to remove all
> >>dependencies for the current JSP page on compile start, then call an
> >>add method for each compile time include dependency found.
> >>
> >>After a JSP page compile has completed any changes to dependencies
> >>are written back out to the JSP_DEPENDENCY.ser file.
> >>
> >>Comments or suggestions?
> >>
> >>Regards,
> >>
> >>Glenn
> >>
> >>----------------------------------------------------------------------
> >>Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
> >>MOREnet System Programming               |  * if iz ina coment.      |
> >>Missouri Research and Education Network  |  */                       |
> >>----------------------------------------------------------------------
> >>
> >>--
> >>To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> >>For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
> >
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message