Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001352 [Resin] minor always 09-18-06 09:23 06-18-07 10:11
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0001352: JSPCompiler multithreaded
Description (rep by Caleb Richardson)

I have quite a large number of JSPs to precompile, and these JSPs share
many interdependent tag files. I am currently programatically invoking
the JSPCompiler.main() method, my question is whether or not it is safe
to fork multiple threads that in turn call JSPCompiler.main(), each
thread handling a subset of the JSPs.

Presumably JSPCompiler uses the same internal code as on demand JSP
compilation post deployment, so I would expect it to be thread safe with
regard to only compiling a given tag file once, even if it is shared
among many JSPs.

So is this safe, and does JSPCompiler already perform this optimization
on SMP machines by checking Runtime.getAvailableProcessors (or checking
via some other technique)?
Additional Information
Attached Files

- Relationships

- Notes
06-18-07 10:11

The JspCompiler API has been refactored. You could use:

JspCompiler compiler = new JspCompiler();

ArrayList<String> pending = new ArrayList<String>();
for (int i = 0; i < filenames.length; i++) {
  compiler.compilePath(pending, filenames[i]);


- Issue History
Date Modified Username Field Change
09-18-06 09:23 ferg New Issue
06-18-07 10:11 ferg Note Added: 0002059
06-18-07 10:11 ferg Assigned To  => ferg
06-18-07 10:11 ferg Status new => closed
06-18-07 10:11 ferg Resolution open => fixed
06-18-07 10:11 ferg Fixed in Version  => 3.1.2

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