What a long subject !

Ayyway:
in attachment there is a text file with the documentation to configure the connection pool provided by JakartaConnectionProvider class.

I already committed the related sources into the cvs... they seems to work fine.
I will do the same for Protomatter.

Regards,
Luca

Connection pool properties
--------------------------

Every connectionProvider class that uses a connection pool facility can manage its own 
connection pool properties.
The dbconnection element can configure those properties using "pool-property" child 
elements.




Jakarta ConnectionProvider supported properties
-----------------------------------------------

Jakarta ConnectionProvider class uses the following properties to configure its 
connection pool:

validationQuery:
The SQL query that will be used to validate connections from this pool before 
returning 
them to the caller. If specified, this query MUST be an SQL SELECT statement that 
returns at least one row. 


maxActive:
The maximum number of active connections that can be allocated from 
this pool at the same time, or zero for no limit.

maxIdle:
The maximum number of active connections that can remain idle in the pool, 
without extra ones being released, or zero for no limit.

maxWait:
The maximum number of milliseconds that the pool will wait (when there are no 
available connections) 
for a connection to be returned before throwing an exception, or -1 to wait 
indefinitely.


For further details:
http://jakarta.apache.org/commons/dbcp/api/org/apache/commons/dbcp/BasicDataSource.html


I added this one to activate the dataSource log.

useLog: "true" | "false"

if "true", force the dataSource to log its statements using log4j.




Jakarta ConnectionProvider configuration example
------------------------------------------------

<dbconnection
  id                      = "jakarta-commons-dbcp"
  isJndi                  = "false"
  isPow2                        = "true"
  default                 = "false"
  connectionProviderClass = "org.dbforms.conprovider.JakartaConnectionProvider"
  connectionPoolURL       = ""
  conClass                = "org.postgresql.Driver"
  name                    = "jdbc:postgresql://localhost/myDatabase"
  username                = "postgres"
  password                = "">
  
  <!-- jdbc properties -->
  <property name="charSet" value="ISO-8859-1" />

  <!-- connection pool dataSource properties -->
  <pool-property name="validationQuery" value=""     />
  <pool-property name="maxActive"       value="10"   />
  <pool-property name="maxIdle"         value="5"    />
  <pool-property name="maxWait"         value="-1"   />
  <pool-property name="useLog"          value="true" />

</dbconnection>

Reply via email to