...
The syntax of the DB Report mediator changes depending on whether you connect to the database using a connection pool, or using a data source. Click on the relevant tab to view the required syntax.
Info |
---|
By default, the maximum number of active transactions is 50. To override this, create a file named transaction.properties by including the following property and add it to the <EI_HOME>/lib directory: com.atomikos.icatch.max_actives=-1 Specifying the value as -1 allows unlimited transactions. Change the value accordingly to limit the number of active transactions based on your environment and the concurrency level of the service. |
Localtabgroup |
---|
Localtab |
---|
active | true |
---|
title | Localtabgroup |
---|
Localtab |
---|
active | true |
---|
title | Connection Pool |
---|
| Code Block |
---|
| <dbreport>
<connection>
<pool>
(
<driver/>
<url/>
<user/>
<password/>
<dsName/>
<icClass/>
<url/>
<user/>
<password/>
)
<property name="name" value="value"/>*
</pool>
</connection>
<statement>
<sql>insert into something values(?, ?, ?, ?)</sql>
<parameter [value="" | expression=""] type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/>*
</statement>+
</dbreport> |
|
Localtab |
---|
| The syntax of the DBLookup mediator further differs based on whether the connection to the database is made using an external datasource or a Carbon datasource. Click on the relevant tab to view the required syntax. Localtabgroup |
---|
Localtab |
---|
| Code Block |
---|
| <dbreport>
<connection>
<pool>
<dsName/>
<icClass/>
<url/>
<user/>
<password/>
<property name="name" value="value"/>*
</pool>
</connection>
<statement>
<sql>select something from table where something_else = ?</sql>
<parameter [value="" | expression=""] type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/>*
</statement>+
</dbreport>
|
|
Localtab |
---|
| Code Block |
---|
| <dbreport>
<connection>
<pool>
<dsName/>
</pool>
</connection>
<statement>
<sql>select something from table where something_else = ?</sql>
<parameter [value="" | expression=""] type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/>*
</statement>+
</dbreport>
|
|
|
|
|
...
Localtabgroup |
---|
Localtab |
---|
| The following UI is displayed when you select the Pool option for the Connection Information parameter, indicating that you want the connection to be made via a connection pool.
The parameters available to configure the DB Report mediator are as follows. Parameter Name | Description |
---|
Use Transaction | This parameter specifies whether the database operation should be performed within a transaction or not. Click Yes or No as relevant. Info |
---|
To include multiple database reports within the same database transaction inside a particular message flow, set the value of this Use Transaction property to Yes. However, when you have more reports it takes more time to complete a transaction and when multiple messages flow in, then multiple transactions can become active at the same time. By default, the maximum number of active transactions is 50 as imposed by the Atomikos JTA implementation. To override this, create a file named transaction.properties by including the following property and add it to the <EI_HOME>/lib directory: com.atomikos.icatch.max_actives=1000 Specifying the value as -1 allows unlimited transactions. Change the value accordingly to limit the number of active transactions based on your environment and the concurrency level of the service. |
| Driver | The class name of the database driver. | Url | The JDBC URL of the database that data will be written to. Set the autoReconnect parameter to true to help reconnect to the database when the connection between the client and the database is dropped. For example, <url>jdbc:mysql://<ip>:<port>/test?autoReconnect=true</url> . | User | The user name used to connect to the database. | Password | The password used to connect to the database. |
If you click Add Property, the page will expand to display the following parameters.
The parameters available to manage properties are as follows. Parameter Name | Description |
---|
Name | The name of the property. | Value | The value of the property. | Action | This parameter enables a property to be deleted. |
The available properties are as follows. Name | Value | Description |
---|
autocommit | true / false | The auto-commit state of the connections created by the pool. | isolation | Connection.TRANSACTION_NONE / Connection.TRANSACTION_READ_COMMITTED / Connection.TRANSACTION_READ_UNCOMMITTED / Connection.TRANSACTION_REPEATABLE_READ / Connection.TRANSACTION_SERIALIZABLE | The isolation state of the connections created by the pool. | initialsize | int | The initial number of connections created when the pool is started. | maxactive | int | The maximum number of active connections that can be allocated from this pool at a given time. When this maximum limit is reached, no more active connections will be created by the connection pool. Specify 0 or a negative value if you do not want to set a limit. | maxidle | int | The maximum number of idle connections to be allowed in the connection pool at a given time. Specify 0 or a negative value if you want the pool to wait indefinitely. | maxopenstatements | int | The maximum number of open statements that can be allocated from the statement pool at a given time. When this maximum limit is reached, no more new statements will be created by the statement pool. Specify 0 or a negative value if you do not want to set a limit. | maxwait | long | The maximum number of milliseconds that the connection pool will wait for a connection to return before throwing an exception when there are no connections available in the pool. Specify 0 or a negative value if you want the pool to wait indefinitely. | minidle | int | The minimum number of idle connections to be allowed in the connection pool at a given time. Specify 0 or a negative value if you want the pool to wait indefinitely. | poolstatements | true/ false | If the value is true , statement pooling is enabled for the pool. | testonborrow | true/ false | If the value is true , objects are validated before they are borrowed from the pool. An object which fails the validation test will be dropped from the pool and another object in the pool will be picked instead. | testwhileidle | true/ false | If the value is true , the objects in the pool will be validated using an idle object evictor (if any exists). Any object which fails this validation test would be dropped from the pool. | validationquery | String | The SQL query that will be used to validate connections from this pool before returning them to the caller. This property helps to reconnect to the database when the database connection between the client and the database is dropped. For example, <property name="validationquery" value="select 1"/> . |
|
Localtab |
---|
| The UI configuration of the DBLookup mediator further differs based on whether the connection to the database is made using an external datasource or a Carbon datasource. Click on the relevant tab to view the required UI configuration. Localtabgroup |
---|
Localtab |
---|
| The following UI is displayed if you select the External option for the Datasource Type parameter, indicating that you want the connection to the database to be made using an external datasource.
The parameters available to configure the DB Report mediator are as follows. Parameter Name | Description |
---|
Use Transaction | This parameter specifies whether the database operation should be performed within a transaction or not. Click Yes or No as relevant. | Initial Context | The initial context factory class. The corresponding Java environment property is java.naming.factory.initial . | Datasource Name | The naming service provider URL . The corresponding Java environment property is java.naming.provider.url . | URL | The JDBC URL of the database that data will be written to. | User | The user name used to connect to the database. | Password | The password used to connect to the database. |
If you click Add Property, the page will expand to display the following parameters.
The parameters available to manage properties are as follows. Parameter Name | Description |
---|
Name | The name of the property. | Value | The value of the property. | Action | This parameter enables a property to be deleted. |
The available properties are as follows. Name | Value | Description |
---|
autocommit | true / false | The auto-commit state of the connections created by the pool. | isolation | Connection.TRANSACTION_NONE / Connection.TRANSACTION_READ_COMMITTED / Connection.TRANSACTION_READ_UNCOMMITTED / Connection.TRANSACTION_REPEATABLE_READ / Connection.TRANSACTION_SERIALIZABLE | The isolation state of the connections created by the pool. | initialsize | int | The initial number of connections created when the pool is started. | maxactive | int | The maximum number of active connections that can be allocated from this pool at a given time. When this maximum limit is reached, no more active connections will be created by the connection pool. Specify 0 or a negative value if you do not want to set a limit. | maxidle | int | The maximum number of idle connections to be allowed in the connection pool at a given time. Specify 0 or a negative value if you want the pool to wait indefinitely. | maxopenstatements | int | The maximum number of open statements that can be allocated from the statement pool at a given time. When this maximum limit is reached, no more new statements will be created by the statement pool. Specify 0 or a negative value if you do not want to set a limit. | maxwait | long | The maximum number of milliseconds that the connection pool will wait for a connection to return before throwing an exception when there are no connections available in the pool. Specify 0 or a negative value if you want the pool to wait indefinitely. | minidle | int | The minimum number of idle connections to be allowed in the connection pool at a given time. Specify 0 or a negative value if you want the pool to wait indefinitely. | poolstatements | true/ false | If the value is true , statement pooling is enabled for the pool. | testonborrow | true/ false | If the value is true , objects are validated before they are borrowed from the pool. An object which fails the validation test will be dropped from the pool and another object in the pool will be picked instead. | testwhileidle | true/ false | If the value is true , the objects in the pool will be validated using an idle object evictor (if any exists). Any object which fails this validation test would be dropped from the pool. | validationquery | String | The SQL query that will be used to validate connections from this pool before returning them to the caller. |
|
Localtab |
---|
| The following UI is displayed if you select the Carbon Datasource option for the Datasource Type parameter, indicating that you want the connection to the database to be made using an Carbon datasource.
Parameter Name | Description |
---|
Use Transaction | This parameter specifies whether the database operation should be performed within a transaction or not. Click Yes or No as relevant. | Datasource | This parameter is used to selected a specific Carbon datasource you want to use to make the connection. All the Carbon datasources which are currently available are included in the list. |
|
|
|
|
...