Hitachi

uCosminexus Application Server System Setup and Operation Guide


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.

J2EE server has the following work directories:

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).

Figure C‒1: Directory structure of the J2EE application (configuration related)

[Figure]

  1. This directory is created for each J2EE application.

  2. This directory is created on importing the EAR file. The directory name is given on based on the EAR file name.

  3. The EAR file is stored with a 17 digit number.ear file name.

  4. This directory is created for each EJB-JAR file. The directory name is given based on the EJB-JAR file name.

  5. The EJB-JAR file is stored with a 17 digit number.jar file name.

  6. This directory is created for each library JAR file. The directory name is given based on the library JAR file name.

  7. The library JAR file is stored with a 17 digit number.jar file name.

  8. This directory is created for each RAR file. The directory name is given based on the RAR file name.

  9. The RAR file is stored with a 17 digit number.rar file name.

  10. This directory is created for each WAR file. The directory name is given based on the WAR file name.

  11. 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).

Figure C‒2: Directory structure of the J2EE application (deployment related)

[Figure]

  1. This directory is created for each J2EE application.

  2. 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.

  3. 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.

Figure C‒3: Directory structure of the J2EE resources

[Figure]

  1. This directory is created for each EJB-JAR file. The directory name is given based on the EJB-JAR file name.

  2. The EJB-JAR files are stored with a 17 digit number.jar file name.

  3. This directory is created for each data source. The directory name is given based on the JDBC driver file name.

  4. The JDBC driver files are saved with a 17 digit number.jar file name.

  5. This directory is created for each JavaMail setting. The directory name is given based on ejbmail.

  6. The files storing the JavaMail settings are saved at this location.

  7. This directory is created for each RAR file. The directory name is given based on the RAR file name.

  8. The RAR files are stored with a 17 digit number.rar file name.

  9. This directory is created for each WAR file. The directory name is given based on the WAR file name.

  10. 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).

Figure C‒4: Directory structure of the J2EE resource adapter (configuration related)

[Figure]

  1. This directory is created for each RAR file. The directory name is given based on the RAR file name.

  2. 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.

Figure C‒5: Directory structure of the J2EE resource adapter (deployment related)

[Figure]

  1. The JAR files in the RAR files are stored with a 17 digit number.jar file name.

  2. 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).

Figure C‒6: Directory structure of the Web application (JSP related)

[Figure]

  1. 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.

  2. 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).

Figure C‒7: Directory structure of the Web application (others)

[Figure]

  1. 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.

  2. 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.

Figure C‒8:  Directory structure of the J2EE server or the Web container server after executing the migration command

[Figure]

(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.

Figure C‒9: Directory structure of the resource adapter after executing the migration command

[Figure]

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.

Figure C‒10: Directory structure of the resource adapter after executing the migration command (when a backup destination directory is specified by using the backupto option)

[Figure]

(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.

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