[ 
https://issues.apache.org/jira/browse/OAK-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593181#comment-14593181
 ] 

Philipp Suter commented on OAK-2986:
------------------------------------

[~reschke], [~chetanm]: I used this example configuration for the Sling 
DataSourceFactory and it works quite well:

defaultAutoCommit=false
validationQuery=SELECT\ 1
jdbcInterceptors=StatementCache(max\=256);SlowQueryReport(threshold\=1000);ConnectionState
testOnBorrow=true
driverClassName=com.mysql.jdbc.Driver
logValidationErrors=false
removeAbandoned=true

For production code testOnBorrow with the validationQuery is quite nice as it 
protects from exception after the connection was returned from the pool.

> RDB: switch to tomcat datasource implementation 
> ------------------------------------------------
>
>                 Key: OAK-2986
>                 URL: https://issues.apache.org/jira/browse/OAK-2986
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: rdbmk
>    Affects Versions: 1.2.2, 1.0.15, 1.3
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 1.3.2
>
>         Attachments: OAK-2986.diff
>
>
> See <https://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html>.
> In addition, this is the datasource used in Sling's datasource service, so 
> it's closer to what people will use in practice.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to