Appendix E.3 Environment setup for using Cosminexus JMS Provider
(1) Preconditions
- Cosminexus installation and J2EE server setup has been completed using management portal (Management Server).
- After the completion of Application Server installation, Cosminexus JMS Provider is installed in the following directory:
<COSMINEXUS_HOME>/CC/cjmsp
Before you execute this procedure, make sure the directory exists.
(2) Process preconditions
- The J2EE server process is already running.
- The CJMSP resource adapter is not running (not imported).
- The CJMSP Broker process is not running.
- The application is not running (not imported).
(3) Information and supplementary explanation required for execution
The coding, such as (A1), corresponds to the coding in the figure.
- (A1)
- instance-name
- If omitted, cjmsbroker is used by default.
- If you want to use multiple instances, make sure that the names do not overlap. To overlap the names, specify the -name option, and assign any non-existent name.
- (A2)
- host-name:port-number
- The host name and port number on which CJMSP Broker is running.
- If you omit the port number when CJMSP Broker is started, the default port number 7676 is used. In this case, you can omit the -b option.
- Make sure that the status of CJMSP Broker is OPERATING.
- Note
- If you start the CJMSP resource adapter when CJMSP Broker is not running normally, an exception occurs and Cosminexus JMS Provider cannot be used.
- (A3)
- Queue-name, Topic-name
- Queue name or Topic name
- maximum-number-of-messages
- Maximum number of messages that can be stored in a Queue or Topic
- total-number-of-message-bytes
- Maximum total message bytes of a Queue or Topic
- maximum-number-of-producers
- Maximum number of producers for a destination
- maximum-consumer-flow-limit
- Maximum number of messages that one processing unit can deliver to a consumer
- host-name:port-number
- The host name and port number on which CJMSP Broker is running.
- If you omit the port number when CJMSP Broker is started, the default port number 7676 is used. In this case, you can omit the -b option.
- (A4)
- Queue-name, Topic-name
- Queue name or Topic name
- host-name:port-number
- The host name and port number on which CJMSP Broker is running.
- If you omit the port number when CJMSP Broker is started, the default port number 7676 is used. In this case, you can omit the -b option.
- Make sure that the destination created in (A3) has been created correctly using the specified property. The mapping between the arguments specified in (A3) and the displayed contents is as follows:
- maxNumMsgs = Max Number of Messages
- maxNumProducers = Max Number of Producers
- maxTotalMsgBytes = Max Total Message Bytes
- consumerFlowLimit = Consumer Flow Limit
- An example display of a property is as follows. This is an example of execution when Queue is created.
Destination Name TestQueue
Destination Type Queue
Destination State RUNNING
Created Administratively true
Current Number of Messages
Actual 0
Held in Transaction 0
Current Message Bytes
Actual 0
Held in Transaction 0
Current Number of Producers 0
Current Number of Active Consumers 0
Max Number of Messages unlimited (-1)
Max Total Message Bytes unlimited (-1)
Max Number of Producers unlimited (-1)
Consumer Flow Limit 100
KDAN34151-I Successfully queried the destination. |
- (A5)
- server-name
- Server name set up with Management Server
- <CJMSP_HOME>
- Cosminexus-installation-directory/CC/cjmsp
- (A6)
- server-name
- Server name set up with Management Server
- CJMSP-resource-adapter-display-name
- Display name of the CJMSP resource adapter
- In Cosminexus JMS Provider, Cosminexus_JMS_Provider_RA is set up by default.
- (A7)
- Copy the template file and then edit the HITACHI Connector Property file. Use <CJMSP_HOME>/lib/templates/Cosminexus_JMS_Provider_RA_cfg.xml as the template file.
- To use a destination, define the Administered object provided by the CJMSP resource adapter.
- An example of setup is as follows. Specify the tags to which numbers are allocated (the numbers are not included in the actual definition).
<config-property>
<description xml:lang="en"></description>
<config-property-name>ConnectionURL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
(1) <config-property-value>mq://localhost:7676/</config-property-value>
</config-property>
<config-property>
<description xml:lang="en"></description>
<config-property-name>clientId</config-property-name>
<config-property-type>java.lang.String</config-property-type>
(2) <config-property-value>Test</config-property-value>
</config-property>
<adminobject>
(3) <adminobject-name>myQueue</adminobject-name>
(4) <adminobject-interface>javax.jms.Queue</adminobject-interface>
(5) <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>
(6) <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>
- The content specified for each number is as follows:
- Specify the host name and port number that starts CJMSP Broker.
- Specify the client identifier. The client identifier is required for using the persistence subscriber.
- Specify the Administered object name in <adminobject-name>. The Administered object name must be unique in the CJMSP resource adapter.
- Specify the interface implemented by the Administered object class in <adminobject-interface>.
When you use Queue, specify javax.jms.Queue.
When you use Topic, specify javax.jms.Topic.
- Specify the Administered object class in <adminobject-class>.
When you use Queue, specify com.cosminexus.jmsprovider.messaging.Queue.
When you use Topic, specify com.cosminexus.jmsprovider.messaging.Topic.
- Set the name of the destination specified in (A3).
Create the <adminobject> tag for each destination to be used.
- Note
- When you use the Message-driven Beans, set up the following two points:
- The value of (a) shown below must be equal to or more than the value of (b).
- The value of total number of (a) of all the deployed Message-driven Beans must be equal to or less than the value of (c) shown below:
Maximum number of pooled Message-driven Bean instances in the HITACHI Application Property file
<pooled-instance>
<minimum>1</minimum>
(a) <maximum>2</maximum>
</pooled-instance>
Maximum number of pooled Endpoint instances in the HITACHI Application Property file
<activation-config-property>
<activation-config-property-name>endpointPoolMaxSize</activation-config-property-name>
(b) <activation-config-property-value>1</activation-config-property-value>
</activation-config-property>
Maximum number of pooled WorkManager threads in the HITACHI Application Property file for the CJMSP resource adapter
<property>
<property-name>MaxTPoolSize</property-name>
<property-type>int</property-type>
(c) <property-value>10</property-value>
<property-default-value>10</property-default-value>
</property>
- (A8)
- server-name
- Server name set up with Management Server
- CJMSP-resource-adapter-display-name
- Display name of the CJMSP resource adapter
- In Cosminexus JMS Provider, Cosminexus_JMS_Provider_RA is set up by default.
- HITACHI-Connector-Property-file-path
- Input source path of the property file
- (A9)
- server-name
- Server name set up with Management Server
- CJMSP-resource-adapter-display-name
- Display name of the CJMSP resource adapter
- In Cosminexus JMS Provider, Cosminexus_JMS_Provider_RA is set up by default.
- Check the following two points with the connection test for the CJMSP resource adapters:
- The operation mode is the 1.4 mode.
- A connection can be established with CJMSP Broker.
- (A10)
- server-name
- Server name set up with Management Server
- CJMSP-resource-adapter-display-name
- Display name of the CJMSP resource adapter
- In Cosminexus JMS Provider, Cosminexus_JMS_Provider_RA is set up by default.
- (A11)
- server-name
- Server name set up with Management Server
- Make sure that the name is displayed as "running CJMSP-resource-adapter-display-name".
- (A12)
- Specify settings to associate the CJMSP resource adapter connection factory and Administered object in the application property.
- An example of setup is as follows. Edit the tags to which numbers are allocated (the numbers are not included in the actual definition).
<resource-ref>
(1) <res-ref-name>jms/qcf</res-ref-name>
(2) <res-type>javax.jms.QueueConnectionFactory</res-type>
(3) <res-auth>Container</res-auth>
(4) <res-sharing-scope>Unshareable</res-sharing-scope>
(5) <linked-to>Cosminexus_JMS_Provider_RA!javax.jms.QueueConnectionFactory</linked-to>
</resource-ref>
<resource-env-ref>
(6) <resource-env-ref-name>jms/TestQueue</resource-env-ref-name>
(7) <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
<linked-adminobject>
(8) <resourceadapter-name>Cosminexus_JMS_Provider_RA</resourceadapter-name>
(9) <adminobject-name>myQueue</adminobject-name>
</linked-adminobject>
</resource-env-ref>
- The content specified for each number is as follows:
- In <res-ref-name>, specify the resource reference name.
- In <res-type>, specify the resource reference type. Specify the connection factory type.
- In <res-auth>, specify whether the authentication for using a resource will be performed on an application or will be entrusted to a container. The specifiable strings are as follows:
Application
Container
- In <res-sharing-scope>, specify whether the resource connections will be shared. The specifiable strings are as follows:
Shareable
Unshareable
- In <linked-to>, specify the corresponding CJMSP resource adapter display name.
CJMSP-resource-adapter-display-name!Connection-definition-identifier
- In <resource-env-ref-name>, specify the name of the resource environment variable reference.
- In <resource-env-ref-type>, specify the interface type of the destination as the Administered object type.
- In <resourceadapter-name>, specify the display name of the CJMSP resource adapter.
- In <adminobject-name>, specify the Administered object name set at (3) in (A7).
- (A13)
- No specific value.
- (A14)
- No specific value.