I any real world scenario you will need pooling for the DataSource. To
achieve this you have two good options:

1. Use a pooling datasource from the vendor:

DB       Class 
Derby 
org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource
MySQL 
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Oracle 
oracle.jdbc.pool.OracleConnectionPoolDataSource
2. Use the PoolingDataSource from dbcp like described in this gist by
Andreas Pieber: https://gist.github.com/2761628

http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access
<http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access>
  



--
View this message in context: 
http://karaf.922171.n3.nabble.com/JDBC-connection-pooling-best-practice-tp4032894p4032895.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to