[b]Hibernate version: 2.1[/b]
I am currently looking at integrating Hibernate into an application that already exists. This application already has its own Connection Pool (that I wrote many years ago :) ). I am now trying to get Hibernate to use MY ConnectionPool. This is actually quite easy, although I found 2 ways (both of which seem to work):
1) Implement net.sf.hibernate.connection.ConnectionProvider.
2) Implement my own javax.sql.DataSource and have IT call my ConnectionPool (this is similar to what I think the Apache projects seem to do, ie build the ConnectionPool into the DataSource itself).
Without really digging into the weeds underneath, is one of these more desirable? If I do 2 above, will Hibernate create a Pool for my ConnectionPool automatically and thus I have too many pools? Or is the default ConnectionProvider NOT pool and thus simply calls the DataSource? Is one more performant? Any other ideas?
I am a newbie to Hibernate and DataSources so I apologize if this is obvious, I am just looking for ideas from people with more experience than myself.
Thanks,
Kevin
|