[Mondrian] Database connection pooling configuration

jeff.s.wright at thomsonreuters.com jeff.s.wright at thomsonreuters.com
Tue Apr 6 10:22:17 EDT 2010

We would like to be able to configure the database connection pool to
testOnBorrow - to check that the connection is not stale. Right now the
pool properties are hard-coded in RolapConnectionPool.


(We originally considered using the datasource method (vs the jdbc url
method) of specifying the database connections.  Since we have quite a
few datasources that are not all known when the container is started, it
seemed more reasonable to take the jdbc url method and specify the
pool's configuration parameters with the jdbc.* properties.)


After looking at RolapConnectionPool.getPool(), it seems that the code
that instantiates the pool could be modified to first use the jdbc.*
properties for each of the pool configuration parameters.  If those
parameters were not supplied, then the currently defined parameters (the
ones in the code) could be used as defaults. In other words, the data
source xml could configure the pool.


This change would leave the existing behavior intact while at the same
time allowing users to customize the pool parameters. The parameters of
interest to us are 'testOnBorrow' and 'validationQuery', but this
solution would also apply to other db pool config parameters.




--Jeff Wright

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100406/9cc071e4/attachment.html 

More information about the Mondrian mailing list