Christopher,

> You will just change the implementation to answer the question "have any
resources been modified, but not-too-recently?"



OK


> The check must be fast, otherwise it will hang-up other processes on the
server. Don't introduce any new loops or stalls. Just return true or false
as quickly as possible. The process will be repeated during the "next"
check so you only have to decide not to reload "too early"?


Not sure that I understand this point (re 'check must be fast'). I wasn't
imagining affecting the initial trigger point at all (i.e. Tomcat has
detected a change in one of the active files) so shouldn't affect the
day-to-day performance. Once Tomcat has decided that a reload is required
*and* the user has requested for Tomcat to do the reload (i.e. Context flag
is defined to true), prior to actioning the reload, add the additional
check (simple user-specified timer delay to allow the external
application time to finish deployment, and then let Netbeans carry on.


Your additional suggestion that the time-stamps of the amended files should
remain consistent over that period also sounds sensible. Given that Tomcat
can't implement the event model for reasons you have already explained, I
am now thinking that the event that triggers the re-build won't contain
details of what files have been amended, simply that there has been a
change. Snapshotting all the files within the two folders, noting the
timestamps and then polling again after the delay seems to be repeating
what Tomcat is probably already doing to trigger the event in the first
place.


Now that I just about have a development environment I can explore and
debug, I think I should spend some time around this class and learn when /
why it's called and the calls it makes to do the reload. So far, I have had
to imagine how the code is structured and so consider a solution based on
that (possibly false hypothesis).


Just to be clear from other questions, I have no intention in going
anywhere near the 'rebuild' process - that is a black box as far as I am
concerned.


John


PS: Nice suggestion about contacting IT for more cores - unfortunately I am
now (recently) retired and so, I am the IT department and the Finance
director (wife) hasn't approved the budget :)

Reply via email to