GVJdbc

From GreenVulcano Wiki
Revision as of 14:23, 14 February 2012 by Anonymous (talk) (Created page with "==Description== This {{GVESB}} element defines the parameters necessary to build a JDBC connection. =={{VULCON}} / {{GVCONSOLE}} Configuration== The GVJdbc Element, used by GV...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

This GreenVulcano® ESB element defines the parameters necessary to build a JDBC connection.

VulCon / GV Console Configuration

The GVJdbc Element, used by GVAdapters, it is visible from the VulCon® Adapter View.

The following table shows the GVJdbc element's attributes:

Attribute Type Description
type fixed This attribute must assume the value module.
name fixed This attribute must assume the value JDBC.

Its subelements are:

Drivers

This element defines the drivers relevant to JDBC calls using one or more Driver subelements.

Driver

Each element Driver defines the necessary parameters to define the Driver to be used for JDBC connections.

The following table shows the Driver element's attributes:

Attribute Type Description
type fixed This attribute must assume the value driver.
enabled optional Defines whether this driver is active or not. The attribute's default value is: No.
class required Defines the class driver.

Ex : oracle.jdbc.driver.OracleDriver

initType optional Some drivers basing on the specifications do not need to be instantiated to be initialized, in this case then the initType would be: 'static'. (The Oracle driver is static.) Ex : oracle.jdbc.driver.OracleDriver

The attribute's default value is: static. The attribute's admitted values are:

  • static
  • instance

Connections

This element defines the necessary parameters to stablish a JDBC connection using it subelement Connection.

Connection

The following table shows the Connection element's attributes:

Attribute Type Description
type fixed This attribute must assume the value connection.
id required Defines the connection identifier. Used to find the connection in the pool.
enabled optional If true the connection is enabled.

The attribute's default value is: No. The attribute's admitted values are:

  • Yes
  • No
connectionString required Defines the connection string to the database. Refer to your database documentation for syntax.
user optional Defines user access to the database. Giving a value to the user is not required if you enter it in the connection String.
password optional Defines the password to the database. The value of the password is not required if you enter it in

the connection string. #Encrypted

connectionMin required Defines the minimum number of connections to be built at initialization.
connectionMax required Defines the maximum number of connections that can be built.
autoCommit optional Defines how to commit the SQL operations. If AutoCommit is 'true' all SQL statements are carried out

and commit such uniqe transactions. If AutoCommit is 'false', but the statement is grouped into transactions that end with the call to a method to commit or rollback. By default, new connections are in autocommit mode. The attribute's default value is: true.

txIsolation optional Defines the level of transaction isolation of the given connection.

Just remember the following concepts:

  • dirty reads : a dirty read occurs when a transaction reads data from a row that has been modified by another transaction,

but not yet committed.

  • non-repeatable : non-repeatable reads may occur in a lock-based concurrency control method when read locks are not acquired when performing a SELECT.
  • phantom : a phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first.

Therefore we list the meanings of the isolation levels of a transaction:

  • TRANSACTION_NONE : Uses DataBase defaults
  • TRANSACTION_READ_UNCOMMITTED : Dirty reads, non-repeatable and phantom reads are possible.
  • TRANSACTION_READ_COMMITTED : Dirty reads not possible, non-repeatable and phantom are possible.
  • TRANSACTION_REPEATABLE_READ : Dirty reads and non-repeatable are not possible, phantom is possible.
  • TRANSACTION_SERIALIZABLE : Dirty reads, non-repeatable and phantom are not possible.

The attribute's default value is: TRANSACTION_NONE.