4.1.12 Properties that you can specify in the <config-property> tag set up for resource adapters of Cosminexus JMS provider

This subsection describes the values that you can specify in the <config-property> tag set up for resource adapters (CJMSP resource adapters) of Cosminexus JMS provider.

Note that you can use template files for specifying the properties of CJMSP resource adapters. For details on the template files, see 4.1.14 Template files of the HITACHI Connector Property File.

Organization of this subsection
(1) Resource adapter (<resourceadapter>) settings
(2) ManagedConnectionFactory (<config-property> of <managedconnectionfactory-class>) settings
(3) Administered object (<adminobject>) settings
(4) Log-related settings

(1) Resource adapter (<resourceadapter>) settings

This subsection describes the properties that you can set up for resource adapters.

Table 4-12 Properties that you can set up for resource adapters (<resourceadapter>)

config-property-nameconfig-property-typeconfig-property-value
connectionURLjava.lang.StringSpecifies a URL for connecting to Cosminexus JMS provider.
The URL includes a host name, port number, and service name.
reconnectAttemptsjava.lang.IntegerSpecifies an integer from 1 to 2147483647​ for the retry count, when an error occurs while establishing a connection with Cosminexus JMS provider. The default value is 6.
reconnectEnabledjava.lang.BooleanSpecifies true (retry) or false (do not retry) for executing retry, when an error occurs while establishing a connection with Cosminexus JMS provider. The default value is false.
reconnectIntervaljava.lang.IntegerSpecifies an integer from 0 to 2147483647​ for the retry interval (unit: milliseconds), when an error occurs while establishing a connection with Cosminexus JMS provider. The default value is 30000.

The following is an example of specification:

<resourceadapter-class>com.cosminexus.jmsprovider.messaging.jms.ra.ResourceAdapter</resourceadapter-class>
<config-property>
  <description xml:lang="en"/>
  <config-property-name>ConnectionURL</config-property-name>
  <config-property-type>java.lang.String</config-property-type>
  <config-property-value>mq://localhost:7676/</config-property-value>
</config-property>
 <config-property>
  <description xml:lang="en"/>
  <config-property-name>ReconnectEnabled</config-property-name>
  <config-property-type>java.lang.Boolean</config-property-type>
  <config-property-value>false</config-property-value>
 </config-property>
 <config-property>
  <description xml:lang="en"/>
  <config-property-name>ReconnectAttempts</config-property-name>
  <config-property-type>java.lang.Integer</config-property-type>
  <config-property-value>6</config-property-value>
 </config-property>
 <config-property>
  <description xml:lang="en"/>
  <config-property-name>ReconnectInterval</config-property-name>
  <config-property-type>java.lang.Integer</config-property-type>
  <config-property-value>30000</config-property-value>
 </config-property>

Note
When setting the properties of resource adapters, if you try to start the resource adapters without editing the values of the administered object (AdminObject) for each queue or topic, an exception is thrown. This exception is output to cjexceptionN.log (N is the number of log files) in the log directory of the J2EE server.

(2) ManagedConnectionFactory (<config-property> of <managedconnectionfactory-class>) settings

This subsection describes the properties that you can set up in ManagedConnectionFactory (<config-property> of <managedconnectionfactory-class>).

Table 4-13 Properties specifiable in ManagedConnectionFactory (<config-property> of <managedconnectionfactory-class>)

config-property-nameconfig-property-typeconfig-property-value
clientIdjava.lang.StringSpecifies the client ID for connecting to Cosminexus JMS provider.
reconnectAttemptsjava.lang.IntegerSpecifies an integer from 1 to 2147483647​ for the retry count when an error occurs while establishing a connection with Cosminexus JMS provider. The default value is 6.
reconnectEnabledjava.lang.BooleanSpecifies true (retry) or false (do not retry) for executing retry when an error occurs while establishing a connection with Cosminexus JMS provider. The default value is false.
reconnectIntervaljava.lang.IntegerSpecifies an integer from 0 to 2147483647​ for the retry interval (unit: milliseconds), when an error occurs while establishing a connection with Cosminexus JMS provider. The default value is 30000.

The following is an example of specification. Note that clientId is not set up in the default status. Add the characters in bold as and when required.

<managedconnectionfactory-class>com.cosminexus.jmsprovider.messaging.jms.ra.ManagedConnectionFactory</managedconnectionfactory-class>
<config-property>
  <description xml:lang="en"/>
  <config-property-name>ReconnectEnabled</config-property-name>
  <config-property-type>java.lang.Boolean</config-property-type>
  <config-property-value>false</config-property-value>
</config-property>
<config-property>
  <description xml:lang="en"/>
  <config-property-name>ReconnectAttempts</config-property-name>
  <config-property-type>java.lang.Integer</config-property-type>
  <config-property-value>6</config-property-value>
</config-property>
 <config-property>
  <description xml:lang="en"/>
  <config-property-name>ReconnectInterval</config-property-name>
  <config-property-type>java.lang.Integer</config-property-type>
  <config-property-value>30000</config-property-value>
 </config-property>
<config-property>
  <config-property-name>ClientId</config-property-name>
  <config-property-type>java.lang.String</config-property-type>
  <config-property-value>Test</config-property-value>
</config-property>

(3) Administered object (<adminobject>) settings

This subsection describes the properties that you can set up in the administered object (<config-property> of <adminobject>).

Table 4-14 Properties specifiable in the administered object (<config-property> of <adminobject>)

config-property-nameconfig-property-typeconfig-property-value
Descriptionjava.lang.StringThis property specifies additional information. Specify the required description. You can also specify spaces.
Namejava.lang.StringSpecifies the destination name that is used for creating the destination specified in the <adminobject> tag. The destination is created with the name specified in this property.

The following is the tag information in the settings for the administered objects. A queue is created in this example. To create a topic, change the type of the destination.

<adminobject>
<adminobject-name>TestQueue</adminobject-name>
<adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject-class>com.cosminexus.jmsprovider.messaging.Queue</adminobject-class>
<config-property>
 <description xml:lang="en"></description>
 <config-property-name>Name</config-property-name>
 <config-property-type>java.lang.String</config-property-type>
 <config-property-value>TestQueue</config-property-value>
</config-property>
<config-property>
 <description xml:lang="en"></description>
 <config-property-name>Description</config-property-name>
 <config-property-type>java.lang.String</config-property-type>
 <config-property-value></config-property-value>
</config-property>
</adminobject>

(4) Log-related settings

This subsection describes the properties that you can set up for a log.

Table 4-15 Properties specifiable for a log

config-property-nameconfig-property-typeconfig-property-value
ExpLogFileNumjava.lang.IntegerSpecifies an integer from 1 to 16 for the maximum number of log files to output the exception log. The default value is 2.
ExpLogFileSizejava.lang.IntegerSpecifies an integer from 8192 to 4194304​ for the maximum log file size (bytes) to output the exception log. The default value is 1048576​.
Once the specified size is reached, a new file is created, and the output destination of log is switched to the created file.
MsgLogFileNumjava.lang.IntegerSpecifies an integer from 1 to 16 for the maximum number of log files to output the message log. The default value is 2.
MsgLogFileSizejava.lang.IntegerSpecifies an integer from 8192 to 4194304​ for the maximum log file size (bytes) to output the message log. The default value is 1048576​.
Once the specified size is reached, a new file is created, and the output destination of the log is switched to the created file.
MsgLogLeveljava.lang.StringSpecifies the log level.
Based on the specified level, the information is output to the log file.
You can specify one of the following values:
  • ERROR
  • WARNING
  • INFO
The default is ERROR.
Note
  • The log file of the CJMSP resource adapter is output to the cjms directory below the <ejb.server.log.directory> directory. When the cjms directory does not exist, first the cjms directory is created below the <ejb.server.log.directory> directory, and then the log is output.
  • The properties of the resource adapter are verified in both the J2EE server and the CJMSP resource adapter. When there is a problem in verifying a property with the J2EE server, an error message is output to the log file of the J2EE server, and then the processing stops. When there is a problem in verifying a property with the CJMSP resource adapter, a warning message is output to the log file of the CJMSP resource adapter; however, the property value is considered as the default value, and the processing continues.