C.1 Work directory of the J2EE server
The J2EE server creates directories and files by using server names, display names of applications, and the files in EAR files in a work directory. The directory names, file names, and path length have an upper limit and the J2EE server cannot operate normally if an entire work directory does not fit into the entire path. This section describes a structure of a work directory and formulas to estimate the path length of a work directory.
- Organization of this subsection
(1) Structure of the work directory of the J2EE server
The work directory of the J2EE server is the work area required for operating the J2EE server. This work area stores information such as user password information, information of imported resource adapters, EAR files, EJB-JAR files, WAR files, and created J2EE applications.
-
The J2EE server has an exclusive directory structure for each J2EE server under the work directory. This allows you to specify common directories for multiple J2EE servers.
-
If you start the J2EE server, by changing the work directory, you cannot use the existing J2EE applications.
-
If you move the work directory to another machine, the J2EE server on another machine cannot recognize the work directory.
-
In a work directory, you cannot use a path name containing a two-byte code.
-
The default work directories are as follows:
-
For Windows
Cosminexus-installation-directory\CC\Server\public
-
For Unix
/opt/Cosminexus/CC/Server/public
You can change the work directory with the ejb.public.directory parameter in the configuration tag of the logical J2EE server (j2ee-server) of the Easy Setup definition file.
-
J2EE server has the following work directories:
-
J2EE application (configuration related)
-
J2EE application (deployment related)
-
J2EE resource
-
J2EE resource adapter (configuration related)
-
J2EE resource adapter (deployment related)
-
Web application (JSP related)
-
Web application (others)
The following subsection describes the directory structure of each of the above-mentioned work directory. The subsection also describes the directory structure after executing the migration command.
A directory structure is shown in the figure and each directory is described. The numbers mentioned in the figure correspond to the numbers mentioned in the explanation. Also, if the same directory contains various types of files, only the longest file name is listed.
(a) J2EE application (configuration related)
The following figure shows the directory structure of the J2EE application (configuration related).
|
-
This directory is created for each J2EE application.
-
This directory is created on importing the EAR file. The directory name is given on based on the EAR file name.
-
The EAR file is stored with a 17 digit number.ear file name.
-
This directory is created for each EJB-JAR file. The directory name is given based on the EJB-JAR file name.
-
The EJB-JAR file is stored with a 17 digit number.jar file name.
-
This directory is created for each library JAR file. The directory name is given based on the library JAR file name.
-
The library JAR file is stored with a 17 digit number.jar file name.
-
This directory is created for each RAR file. The directory name is given based on the RAR file name.
-
The RAR file is stored with a 17 digit number.rar file name.
-
This directory is created for each WAR file. The directory name is given based on the WAR file name.
-
The WAR file is stored with a 17 digit number.jar file name.
(b) J2EE application (deployment related)
The following figure shows the directory structure of the J2EE application (deployment related).
|
-
This directory is created for each J2EE application.
-
This file is created when you start the J2EE application. If the J2EE application includes the home interface, remote interface, and interfaces implementing java.rmi.Remote, the files are created based on their package names or class names.
-
This file is created when you start the J2EE application. If J2EE application includes home, remote, local, and local home interfaces, the files are created based on their package names or class names.
(c) J2EE resource
The following figure shows the directory structure of the J2EE resources.
|
-
This directory is created for each EJB-JAR file. The directory name is given based on the EJB-JAR file name.
-
The EJB-JAR files are stored with a 17 digit number.jar file name.
-
This directory is created for each data source. The directory name is given based on the JDBC driver file name.
-
The JDBC driver files are saved with a 17 digit number.jar file name.
-
This directory is created for each JavaMail setting. The directory name is given based on ejbmail.
-
The files storing the JavaMail settings are saved at this location.
-
This directory is created for each RAR file. The directory name is given based on the RAR file name.
-
The RAR files are stored with a 17 digit number.rar file name.
-
This directory is created for each WAR file. The directory name is given based on the WAR file name.
-
The WAR files are stored with a 17 digit number.jar file name.
(d) J2EE resource adapter (configuration related)
The following figure shows the directory structure of the J2EE resource adapter (configuration related).
|
-
This directory is created for each RAR file. The directory name is given based on the RAR file name.
-
The RAR files are stored with a 17 digit number.rar file name.
(e) J2EE resource adapter (deployment related)
The following figure shows the directory structure of the J2EE resource adapter (deployment related). Also, in the figure, if the same directory contains various types of files, only the longest file name is listed.
|
-
The JAR files in the RAR files are stored with a 17 digit number.jar file name.
-
The native library file in the RAR file is stored at this location.
(f) Web application (JSP related)
The following figure shows the directory structure of the Web application (JSP related).
|
-
This directory is created with the name specified in the context root. If the name contains a forward slash (/), the slash is replaced with a string of 3 characters.
-
A class file created by compiling the JSPs is stored at this location. If characters other than alphanumeric characters are included in the JSP file name, each character is replaced with a string of 6 characters. Also, if the file name begins with a number, 1 character is added.
(g) Web application (others)
The following figure shows the directory structure of the Web application (others).
|
-
This directory is created with the name specified in the context root. If the name contains a forward slash (/), the slash is replaced with a string of 3 characters.
-
The files included in the WAR file are extracted at this location.
(h) Directory structure of the J2EE server or Web container server (compatibility functionality) after executing migration command
When you execute the migration command of the J2EE server or the Web container server, a directory with the name work directory_old is created under the work directory, and the files in the work directory of the earlier version are saved in that created directory. For future upgrade installation, the path length must have a space for work directory_old. The following figure shows the directory structure of the J2EE server or the Web container server, after executing the migration command.
|
(i) Directory structure of the resource adapter after executing the migration command
When you execute the migration command of the resource adapter, a directory with the name rarupdate_bk is created, and resource adapter files of each J2EE server are stored here. If the work directory is ...\directory-name, or .../directory-name, the backup RAR directory is set as ...\directory-name\rarupdate_bk, or .../directory-name/rarupdate_bk. The following figure shows the directory structure of the resource adapter after executing the migration command.
|
If there is no space for adding the path length of rarupdate_bk under the work directory, you can specify a backup destination directory by using the -backupto option when executing the migration command, and store the files to the area having a space for path length. The following figure shows the directory structure of the resource adapter after executing the migration command when using the -backupto option.
|
(2) Formulas for estimating path length of the work directory
The following are the formulas for estimating the path length of the work directory (unit: bytes). Adjust various parameters so that all of these formulas are satisfied. Also, the Maximum Path Length used in these formulas is the path length limit that is specified for the OS. For details on the path length limit of the OS, check your OS documents.
Note that the maximum path length in Windows is 259 bytes.
-
A+2 × B+C+D+E+58 ≤ maximum path length
-
A+2 × B+C+E'+61 ≤ maximum path length
-
A+2 × B+C+E''+50 ≤ maximum path length
-
A+2 × B+C+D+ (greater value of F+37or M+68)+23 ≤ maximum path length (If F ≤ 35, convert to 35)
-
A+2 × B+C+G+22 ≤ maximum path length (if G ≤ 18, convert to 18)
-
A+B+C+H+I+8 × 123maximum path length
-
A+2 × B+C+J+34 ≤ maximum path length
-
J+K+18 ≤ maximum path length
-
A+2 × B+C+L+43 ≤ maximum path length (when using Cosminexus RM)
-
K+L+27 ≤ maximum path length (when using Cosminexus RM)
-
A+2 × B+C+H+L+I+N+22 ≤ maximum path length
-
A+2 × B+C+H+L+O+N+39 ≤ maximum path length
-
P+H+I+N+3 ≤ maximum path length
-
O+H+M+N+20 ≤ maximum path length
- Legend:
-
A: Path length up to the work directory
B: Length of the work directory name
C: Length of the longest server name
D: Length of the longest J2EE application name
E: Length of the longest file name from among the imported EJB-JAR files, WAR files, RAR files, library JAR, and EAR file names (including the files in the EAR files)
E': Length of the longest file name from among the imported EJB-JAR files, WAR files, RAR files, JDBC drivers, and mails (including the files in the EAR file) (convert the mail to 7)
E'': Length of the longest file name from among the imported RAR file names
F: Length of the longest file name from among the EJB interface classes, interfaces or classes implementing java.emi.Remote, and EJB component classes contained in the J2EE applications (including package names).
G: Length of the longest file name from among the native library files
H: Length of the longest context root (when / is involved replace with / × 3)
I: Length of the longest path in the WAR files
J: Length of the longest resource adapter display name
K: Length of the log file output directory path (value specified with the ejb.Server.log.directory parameter in the configuration tag of the logical J2EE server (j2ee-server) of the Easy Setup definition file
L: Length of the longest Cosminexus RM display name
M: Length of the longest class name from among the EJB Bean classes contained in the J2EE applications (not including the package names)
N: Length of the longest class name of JSP/tag file compilation
O: Length of the longest package name of the tag file
P: Length of the path to the temporary directory for JSP