Difference between revisions of "GVJDBCConnectionBuilder"

From GreenVulcano Wiki
Jump to: navigation, search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
  
This element defines the helpers necessary to create a JDBC connection.
+
This element defines the helpers necessary to create JDBC connections.
  
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
 
=={{VULCON}} / {{GVCONSOLE}} Configuration==
  
{{GVESB}} uses the GVJDBCConnectionBuilder adapter for creating a JDBC connection. It is used by DataHandler, Excel Report and <nowiki>sql*{{...}}</nowiki> Metadata.
+
{{GVESB}} uses the GVJDBCConnectionBuilder adapter for creating JDBC connections. It is used by DataHandler, Excel Report and <nowiki>sql*{{...}}</nowiki> metadata.
  
The following table shows the element's attributes GVJDBCConnectionBuilder:
+
If the client's requested connection isn't configured the GVJDBCConnectionBuilder try to instantiate a [[GVJDBCConnectionBuilder#DataSourceConnectionBuilder|DataSourceConnectionBuilder]] using the requested connection name as a DataSource JNDI name.
 +
 
 +
The following table shows the GVJDBCConnectionBuilder element's attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
Line 17: Line 19:
  
 
Might contain the following sub-elements:
 
Might contain the following sub-elements:
* Description
+
* [[Description]]
* [[JDBCConnectionBuilder#DriverConnectionBuilder|DriverConnectionBuilder]]  
+
* [[GVJDBCConnectionBuilder#DataSourceConnectionBuilder|DataSourceConnectionBuilder]]
* [[JDBCConnectionBuilder#DriverPoolConnectionBuilder|DriverPoolConnectionBuilder]]
+
* [[GVJDBCConnectionBuilder#DriverConnectionBuilder|DriverConnectionBuilder]]  
* [[JDBCConnectionBuilder#DataSourceConnectionBuilder|DataSourceConnectionBuilder]]
+
* [[GVJDBCConnectionBuilder#DriverPoolConnectionBuilder|DriverPoolConnectionBuilder]]
 +
 
 +
===DataSourceConnectionBuilder===
 +
 
 +
Creates a JDBC connection using a [http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html DataSource].
 +
 
 +
The following table shows the DataSourceConnectionBuilder element's attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| type || fixed || This attribute must assume the value jdbc-connection-builder
 +
|-
 +
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.j2ee.db.connections.impl.DataSourceConnectionBuilder'''.
 +
|-
 +
| name || required || Builder name.
 +
|-
 +
| data-source-jndi || required || DataSource JNDI name.
 +
|}
 +
 
 +
Might contain the following sub-elements:
 +
* [[Description]]
 +
* [[JNDIHelper]]
  
 
===DriverConnectionBuilder===
 
===DriverConnectionBuilder===
  
Creates a JDBC connection using the [[DriverManager]].
+
Creates a JDBC connection using the [http://docs.oracle.com/javase/6/docs/api/java/sql/DriverManager.html DriverManager].
  
The following table shows the element's attributes DriverConnectionBuilder:
+
The following table shows the DriverConnectionBuilder element's attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
Line 40: Line 63:
 
| url || required || JDBC connection URL.
 
| url || required || JDBC connection URL.
 
|-
 
|-
| user || optional || JDBC connection user name.
+
| user || optional || user name.
 
|-
 
|-
| password || optional || JDBC connection password.
+
| password || optional || password.
 
|}
 
|}
  
 
===DriverPoolConnectionBuilder===
 
===DriverPoolConnectionBuilder===
  
This item creates a JDBC connection (pool) using Apache DBCP.
+
Creates a JDBC connection pool using [http://commons.apache.org/dbcp/ Apache DBCP].
  
The following table shows the element's attributes DriverPoolConnectionBuilder:
+
The following table shows the DriverPoolConnectionBuilder element's attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
Line 63: Line 86:
 
| url || required || JDBC connection URL.
 
| url || required || JDBC connection URL.
 
|-
 
|-
| user || optional || JDBC connection user name.
+
| user || optional || user name.
 
|-
 
|-
| password || optional || JDBC connection password.
+
| password || optional || password.
 
|}
 
|}
  
 
Might contain the following sub-elements:
 
Might contain the following sub-elements:
* Description
+
* [[Description]]
* [[PoolParameters]]
+
* [[#PoolParameters|PoolParameters]]
  
===DataSourceConnectionBuilder===
+
====PoolParameters====
  
This elements creates a JDBC connection using a DataSource.
+
Apache DBCP Pool parameters. All time values are in seconds.
  
The following table shows the element's attributes DataSourceConnectionBuilder:
+
The following table shows the PoolParameters element's attributes:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
 
|-
 
|-
| type || fixed || This attribute must assume the value jdbc-connection-builder
+
| minIdle || optional || Controls the maximum number of objects that can sit idle in the pool at any time.
 +
When negative, there is no limit to the number of objects that may be idle at one time.
 +
The default setting for this parameter is 5.
 +
|-
 +
| maxIdle || optional || Controls the maximum number of objects that can sit idle in the pool at any time.
 +
When negative, there is no limit to the number of objects that may be idle at one time.
 +
The default setting for this parameter is 10.
 
|-
 
|-
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.j2ee.db.connections.impl.DataSourceConnectionBuilder'''.
+
| maxActive || optional || Controls the maximum number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time.
 +
When non-positive, there is no limit to the number of objects that can be managed by the pool at one time.
 +
When maxActive is reached, the pool is said to be exhausted.
 +
The default setting for this parameter is 15.
 
|-
 
|-
| name || required || Builder name.
+
| timeBetweenEvictionRuns || optional || Indicates how long the eviction thread should sleep before "runs" of examining idle objects. When non-positive, no eviction thread will be launched.
 +
The default setting for this parameter is 300 seconds (i.e., 5 minutes).
 
|-
 
|-
| data-source-jndi || required || DataSource JNDI name.
+
| minEvictableIdleTime || optional || Specifies the minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due to idle time.
 +
When non-positive, no object will be dropped from the pool due to idle time alone.
 +
This setting has no effect unless timeBetweenEvictionRuns > 0.
 +
The default setting for this parameter is 300 seconds (i.e., 5 minutes).
 
|}
 
|}
  
Might contain the following sub-elements:
+
Its sub-elements are:
* Description
+
* [[Description]]
* [[JNDIHelper]]
+
* validationQuery: Apache DBCP pooled connection validation query.
 +
 
 +
{{VOTE}}

Latest revision as of 09:08, 13 November 2012

Description

This element defines the helpers necessary to create JDBC connections.

VulCon / GV Console Configuration

GreenVulcano® ESB uses the GVJDBCConnectionBuilder adapter for creating JDBC connections. It is used by DataHandler, Excel Report and sql*{{...}} metadata.

If the client's requested connection isn't configured the GVJDBCConnectionBuilder try to instantiate a DataSourceConnectionBuilder using the requested connection name as a DataSource JNDI name.

The following table shows the GVJDBCConnectionBuilder element's attributes:

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

Might contain the following sub-elements:

DataSourceConnectionBuilder

Creates a JDBC connection using a DataSource.

The following table shows the DataSourceConnectionBuilder element's attributes:

Attribute Type Description
type fixed This attribute must assume the value jdbc-connection-builder
class fixed This attribute must assume the value it.greenvulcano.gvesb.j2ee.db.connections.impl.DataSourceConnectionBuilder.
name required Builder name.
data-source-jndi required DataSource JNDI name.

Might contain the following sub-elements:

DriverConnectionBuilder

Creates a JDBC connection using the DriverManager.

The following table shows the DriverConnectionBuilder element's attributes:

Attribute Type Description
type fixed This attribute must assume the value jdbc-connection-builder
class fixed This attribute must assume the value it.greenvulcano.gvesb.j2ee.db.connections.impl.DriverConnectionBuilder.
name required Builder name.
driver-class required JDBC driver class.
url required JDBC connection URL.
user optional user name.
password optional password.

DriverPoolConnectionBuilder

Creates a JDBC connection pool using Apache DBCP.

The following table shows the DriverPoolConnectionBuilder element's attributes:

Attribute Type Description
type fixed This attribute must assume the value jdbc-connection-builder
class fixed This attribute must assume the value it.greenvulcano.gvesb.j2ee.db.connections.impl.DriverPoolConnectionBuilder.
name required Builder name.
driver-class required JDBC driver class.
url required JDBC connection URL.
user optional user name.
password optional password.

Might contain the following sub-elements:

PoolParameters

Apache DBCP Pool parameters. All time values are in seconds.

The following table shows the PoolParameters element's attributes:

Attribute Type Description
minIdle optional Controls the maximum number of objects that can sit idle in the pool at any time.

When negative, there is no limit to the number of objects that may be idle at one time. The default setting for this parameter is 5.

maxIdle optional Controls the maximum number of objects that can sit idle in the pool at any time.

When negative, there is no limit to the number of objects that may be idle at one time. The default setting for this parameter is 10.

maxActive optional Controls the maximum number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time.

When non-positive, there is no limit to the number of objects that can be managed by the pool at one time. When maxActive is reached, the pool is said to be exhausted. The default setting for this parameter is 15.

timeBetweenEvictionRuns optional Indicates how long the eviction thread should sleep before "runs" of examining idle objects. When non-positive, no eviction thread will be launched.

The default setting for this parameter is 300 seconds (i.e., 5 minutes).

minEvictableIdleTime optional Specifies the minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due to idle time.

When non-positive, no object will be dropped from the pool due to idle time alone. This setting has no effect unless timeBetweenEvictionRuns > 0. The default setting for this parameter is 300 seconds (i.e., 5 minutes).

Its sub-elements are:

  • Description
  • validationQuery: Apache DBCP pooled connection validation query.

{{#w4grb_rate:}} <w4grb_ratinglist latestvotes items="5" nosort/>