uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

13.1.2 Settings of a common definition file

Use a common definition file to define the common system operations. The following points describe various details such as the file name, storage directory name, and settings of a common definition file:

Organization of this subsection
(1) File name
(2) Storage directory
(3) Settings
(4) When changing the settings

(1) File name

The file name of a common definition file is as follows.

cjrconf.properties

(2) Storage directory

The storage directory of a common definition file is as follows. The storage destination is fixed.

Cosminexus-installation-directory\jaxrs\conf

(3) Settings

The following table lists and describes the key names to be set up and the corresponding values to be specified.

Table 13-1 Settings of a common definition file

No. Settings Key name Values to be specified Default value
1 Output level of the operation log com.cosminexus.jaxrs.logger.runtime.message.level Specify the output level of the operation log.
Specify ERROR, WARN, INFO, DEBUG, or NONE. For details on the output contents corresponding to each of the specified values, see 39.3.4 Log importance and the output conditions.
INFO
2 Number of operation log files com.cosminexus.jaxrs.logger.runtime.message.file_num Specify the number of the operation log files.
Specify a value in the range of 1 through 16.
2
3 Size of the operation log com.cosminexus.jaxrs.logger.runtime.message.file_size Specify the size of the operation log.
Specify a value in the range of 4096 through 16777216 (unit: bytes).
2097152
4 Output of the maintenance log com.cosminexus.jaxrs.logger.runtime.maintenance.level Specify whether to output the maintenance log.
When you specify ALL, the maintenance log is output.
When you specify NONE, the maintenance log is not output.
ALL
5 Number of maintenance log files com.cosminexus.jaxrs.logger.runtime.maintenance.file_num Specify the number of maintenance log files.
Specify a value in the range of 1 through 16.
2
6 Size of the maintenance log com.cosminexus.jaxrs.logger.runtime.maintenance.file_size Specify the size of the maintenance log.
Specify a value in the range of 4096 through 16777216 (unit: bytes).
16777216
7 Output level of the exception log com.cosminexus.jaxrs.logger.runtime.exception.level Specify the output level of the exception log. Specify ERROR, WARN, INFO, DEBUG, or NONE. For details on the output contents corresponding to each specified value, see 39.3.4 Log importance and the output conditions. INFO
8 Number of exception log files com.cosminexus.jaxrs.logger.runtime.exception.file_num Specify the number of exception log files.
Specify a value in the range of 1 through 16.
2
9 Size of the exception log com.cosminexus.jaxrs.logger.runtime.exception.file_size Specify the size of the exception log.
Specify a value in the range of 4096 through 16777216 (unit: Bytes).
16777216
10 Output level of the communication log (for Web resource)
#1
com.cosminexus.jaxrs.logger.runtime.transport.server.level Specify the output level of the communication log for the Web resource.#2
When you specify NONE, the communication log is not output.
When you specify ALL, the sent and received HTTP header and the entity body are always output to the communication log.
When you specify HEADER, the HTTP header of the sent and received messages is always output to the communication log.
NONE
11 Output level of the communication log (for the client in the Web resource) com.cosminexus.jaxrs.logger.runtime.transport.client.level Specify the output level of the communication log for the client in the Web resource.#2

If you specify NONE, the communication log is not output.

If you specify ALL, the sent and received HTTP header and entity body are always output to the communication log.
When you specify HEADER, the HTTP header of the sent and received messages is always output to the communication log.
NONE
12 Number of the communication log com.cosminexus.jaxrs.logger.runtime.transport.file_num Specify the number of the communication log.
Specify a value in the range of 1 through 16.
2
13 Size of the communication log com.cosminexus.jaxrs.logger.runtime.transport.size Specify the size of the communication log.
Specify a value in the range of 4096 through 1677721 (unit: Bytes).
16777216
14 Character encoding of the communication log com.cosminexus.jaxrs.logger.runtime.transport.encoding Specify the character encoding of the communication log. For the details on the encodings supported by J2SE 6.0, see the J2SE 6.0 documentation.
When you specify DEFAULT, the default platform encoding is used.
DEFAULT
15 Deterring the WADL publication #1 com.sun.jersey.config.feature.DisableWADL Specify whether to prevent the WADL publication. #2
When you specify true, the WADL publication is deterred.
When you specify false, the WADL publication is not deterred.
false
16 Enabling the JSON to POJO mapping#1, #3 com.sun.jersey.api.json.POJOMappingFeature Specify whether to enable the JSON POJO mapping.#2
If you specify true, the JSON POJO mapping is enabled.
If you specify false, the JSON POJO mapping is disabled.
false
17 Automatic redirect#3 com.sun.jersey.client.property.followRedirects Set whether the common definition file must automatically follow the HTTP redirect (a request of 300 level HTTP status codes).
If you specify true, the file automatically follows the HTTP redirect.
If you specify false, the file does not automatically follow the HTTP redirect.
The operation when you specify the automatic redirect feature is same as the operation when you specify the value for automatic redirect in the argument and call the feature by using the setInstanceFollowRedirects method of the HttpURL Connection class of the Java SE.#2
true
18 The client socket connection timeout#3 com.sun.jersey.client.property.connectTimeout Specify the client socket connection timeout.
The timeout specified by using this property is effective when calling a Web resource.
Specify a value in the range of 0 through 2147483647 (in milliseconds). If you specify 0, the connection timeout is not performed.
If the settings of the OS to TCP connection are changed, the value set in the OS might be given priority.
0
19 The client socket read timeout #3 com.sun.jersey.client.property.readTimeout Specify the client socket read timeout.
The timeout specified by using this property is effective when calling a Web resource.
Specify a value within the range of 0 through 2147483647 (in milliseconds). If you specify 0, the connection does not time out.
If the settings of the OS to TCP connection are changed, the value set in the OS might be given priority.
0
20 Chunked transfer encoding#3 com.sun.jersey.client.property.chunkedEncodingSize Specify whether to use the chunked transfer encoding by specifying a value within the range of 0 through 2147483647 (unit: milliseconds). If you specify 0, the default value is applied.
The operation when you specify the chunked transfer encoding feature is same as that when you specify the value for chunked transfer encoding in an argument and call the feature by using the setChunkedStreamingMode method of the HttpURL Connection class of the Java SE.
4096
21 Buffering of the response entity when an exception is thrown#3 com.sun.jersey.client.property.bufferResponseEntityOnException Specify whether to automatically buffer a response entity and close the streaming if the UniformInterfaceException exception is thrown and the response contains the entity.#2
If you specify true, the entity of the HTTP response is automatically buffered and the streaming closes.
If you specify false, the streaming of the entity of the HTTP response does not close automatically.
true

#1
On the Web resource side, the value specified in the servlet initialization parameter is given a priority over the value specified in the property.

#2
The property value is not case sensitive. If you specify an invalid value, the property value is used as the default value.

#3
The client side gives priority to the value specified in the property over the value specified in the client APIs.

(4) When changing the settings

Stop all the J2EE servers that are not using the process-wise definition file, and then change the settings of the common definition file. For details on the process-wise definition file, see 10.1.3 Setting up a process-wise definition file.

To change the log-related settings, save the log as and when required and then make the necessary changes.