Of the files loaded using the class loader, the J2EE server detects the updates and reloads the files when the monitored files are updated. The file updates are detected when the J2EE application starts.
However, the updates are not detected for the files that are not loaded with the class loader. The updates are not detected for the files that are in the application directory but are not loaded and the J2EE application files that do not use the application directory. Furthermore, the updates are not detected for the DD (ejb-jar.xml and web.xml).
Also, with the exploded archive format, if the date of update of an updated JSP file is old, the JSP re-compilation is not executed.
The following table describes the target files for update detection.
Table 13-13 Target files for update detection
Type | Target files for update detection | Scope of reloading#1 | |||
---|---|---|---|---|---|
app | web | jsp | |||
Files beneath the application directory |
| Y | -- | -- | |
EJB application files (EJB-JARs) beneath the EJB-JAR directory |
| Y | -- | -- | |
Web application files (WARs) beneath the WAR directory | Servlet |
| Y | Y | -- |
JSP |
| Y#2 | Y#2 | Y#2 | |
| Y#3 | Y#3 | Y#3 | ||
| Y#4 | Y#4 | Y#4 | ||
| Y#5 | Y#5 | Y#5 | ||
Files other than those beneath the application directory |
| Y | -- | -- |
#1: app, web, and jsp in the scope of reloading are the values specified in the ejbserver.deploy.context.reload_scope key of usrconf.properties.
#2: The updates are detected for the JSPs that are not pre-compiled and are already loaded.
#3: The updates are detected if the tag files and tag library descriptors are used with loaded JSP files or tag files when the JSPs are not pre-compiled.
#4: The updates are detected when the JSPs are pre-compiled.
#5: The updates are detected when the JSP files or tag files are dependent files. The dependent files are the files that are included in the include directive of the JSP files or tag files and the files that are included in <include-prelude> or <include-coda> of web.xml.
The following table describes the examples of files for which updates are detected from among the files beneath the application directory.
Table 13-14 Examples of target files for update detection
Directory | Files beneath the directory | Update detection target | |||||
---|---|---|---|---|---|---|---|
Application-directory | Example of library JARs: MyLibrary.jar | Y | |||||
META-INF |
| -- | |||||
EJB-JAR-directory | -- | -- | |||||
META-INF | DD for the EJB-JARs (ejb-jar.xml) | -- | |||||
Package-name | Enterprise Bean classes Example: MyEJB.class | Y | |||||
Home interface classes Example: MyEJBHome.class | Y | ||||||
Component interface classes Example: MyEJBRemote.class | Y | ||||||
Business interface classes Example: MyBusiness.class | Y | ||||||
Classes used from the EJB Example: MyClass.class | Y | ||||||
Property files loaded by java.util.ResourceBundle Example: MyResource.properties | Y | ||||||
WAR-directory | JSP files Example: MyJsp.jsp | Y | |||||
Static contents Example: MyStatic.jspf | Y | ||||||
HTML files Example: MyIndex.html | -- | ||||||
META-INF | -- | -- | |||||
WEB-INF | DD for the Web applications (web.xml) | -- | |||||
Tag file descriptor file Example: MyTaglib.tld | Y | ||||||
Web application property file (hitachi_web.properties) | -- | ||||||
classes | -- | -- | |||||
Package-name | Property files loaded by java.util.ResourceBundle Example: MyResource.properties | Y | |||||
Servlet classes Example: MyServlet.class | Y | ||||||
lib | JAR files Example: MyLibrary.jar | Y | |||||
tags | Tag files Example: MyTag.tag | Y | |||||
JSP-working-directory | JSP compilation results Example: MyJsp$jsp.class | Y | |||||
WEB-INF | tags | Tag file compilation results Example: MyTag$tag.class | Y | ||||
Directory-other-than-the-application-directory | Reference libraries Example: MyRef.jar | Y |
When the files to be monitored are changed, whether updates are detected and reload is executed differs depending upon the file operations. The following table describes the operations that are reloaded.
Table 13-15 Operations that are reloaded
Target files for update detection | File operations | Notes | |||
---|---|---|---|---|---|
Add | Delete | Update | |||
Files beneath the application directory | Library JAR | N | N | Y |
|
Cosminexus application property file | N | N | N |
| |
EJB application files (EJB-JARs) beneath the EJB-JAR directory | Class files configuring the EJB | N | N | Y |
|
Other class files | N | N | Y |
| |
Web application files (WARs) beneath the WAR directory | Class files | R | Y | Y | -- |
JAR files | Y | Y | Y | -- | |
Property files | R | Y | Y | -- | |
JSP files | R | Y#2 | Y#2 | -- | |
Tag files | R | Y#2 | Y#2 |
| |
Files on which the JSP files or tag files depend | R | Y#2 | Y#2 | -- | |
Static contents | R | N | N |
| |
JSP compilation results (class files generated by compiling the JSPs and tag files) | R | Y | Y |
| |
Files other than those beneath the application directory | Reference libraries | N | N | Y |
|
#1: Some annotations can be updated and some cannot be updated. For details on annotations, see 12.6.1 Updating the annotations.
#2: When the JSP pre-compile functionality is enabled, R.