3.20.2 Notes on system setup
(1) Notes on system setup
This section describes the notes on system setup when you start a transaction with an EJB client application. For details on the settings of the EJB client application transactions, see (2) Settings for using a transaction with an EJB client application.
- When you start a transaction with an EJB client application, to use a global transaction, the light transaction functionality must be disabled on Application Server (enabled by default).
- If the EJB to be invoked is specified in the attributes such as the Mandatory attribute, Required attribute, or Supports attribute in an EJB container-managed transaction (CMT), the EJB is executed within the scope of the transaction started with the EJB client application.
(2) Settings for using a transaction with an EJB client application
This section describes the settings for using a transaction with an EJB client application.
- Note
- When you use uCosminexus Client to set up the EJB client environment, the EJB client application transactions are not available.
To use transactions with the EJB client applications, you must specify the following settings:
- JAR file settings
- Property settings
- Settings for obtaining UserTransaction
The settings for obtaining UserTransaction are the settings used for developing the J2EE applications. To use transactions with the EJB client applications, you must specify settings to obtain UserTransaction (javax.transaction.UserTransaction) from the EJB client application. For details on how to specify the settings, see 3.5 Implementing transactions with the EJB client applications in the uCosminexus Application Server EJB Container Functionality Guide.
This subsection describes the JAR file and property settings for using transactions with the EJB client applications.
(3) JAR file settings
To use transactions with the EJB client applications, specify the following JAR files in the class path:
- In Windows
- Cosminexus-installation-directory\TPB\lib\tpotsinproc.jar
- Cosminexus-installation-directory\CC\lib\ejbserver.jar#
- In UNIX
- /opt/Cosminexus/TPB/lib/tpotsinproc.jar
- /opt/Cosminexus/CC/lib/ejbserver.jar#
- #: In the class path settings, specify ejbserver.jar after HiEJBClientStatic.jar.
For details on specifying the JAR file in the class path, see 3.7.4 Specifying the JAR file in the class path of the EJB client application in the uCosminexus Application Server EJB Container Functionality Guide.
(4) Property settings
This section describes the keys that must be set up to use transactions with the EJB client applications. For details on the property settings, see 3.3.5 Setting up the EJB client application properties in the uCosminexus Application Server EJB Container Functionality Guide. For details on the keys, see 14.3 usrconf.properties (User property file for Java applications) in the uCosminexus Application Server Definition Reference Guide.
To use transactions with the EJB client applications, you set up the following keys:
(a) Mandatory properties
- ejbserver.client.transaction.enabled
Specify true to enable the use of transactions with the EJB client applications.
- ejbserver.distributedtx.recovery.port
Specifies the fixed port number to be used for transaction recovery when a global transaction is used. Specify a different port number for each EJB client process. Also, specify a port number different from the port number for the recovery of Application Server operating on the same computer.
- ejbserver.client.transaction.clientName
Specifies the client name to be used by the transaction service. Specify a different name for each EJB client process in this property. Also, specify a name different from the name of the J2EE server operating on the same computer.
- ejbserver.distributedtx.ots.status.directory1
Specifies the directory for allocating the status file to be used by the transaction service and the backup of the status file. Specify a different directory for each EJB client process. Also, specify a directory different from the status file directory specified for the J2EE server.
(b) Optional properties
- ejbserver.jta.TransactionManager.defaultTimeOut
Specifies the time until a transaction timeout occurs.
- ejbserver.distributedtx.ots.status.directory2
Specify the second directory for allocating the status file to be used by the transaction service and the backup of the status file. Specify a different directory for each EJB client process. Also, specify a directory different from the status file directory specified for the J2EE server.
(5) Notes
This section describes the notes on specifying the settings for the EJB client application transactions.
To use a global transaction, you must disable the light transaction functionality on Application Server. By default, the light transaction functionality is enabled. If you specify true in the ejbserver.distributedtx.XATransaction.enabled key of usrconf.properties for the J2EE servers, the light transaction functionality is disabled and the global transaction can be used.