What are the plans for connection pooling?I had a look to this feature and, based on my understanding of the JCA specficications, I think that connection pooling should be tackled by responding to the "Connection Management" section.
More accurately, whatever the interface - cci or non-cci a la javax.sql.DataSource - it is possible to implement a generic connection pooling mechanism.
I tried to give a "fare" try to the DBCP package (I am definitively a brand new DBCP user) in order to implement the "Connection Management" section of the JCA specifications. And I was quickly stuck by the following issues (one more time, I am a new DBCP user):
- PoolableConnection is a physical connection wrapper. Such a wrapper is provided by a JDBC vendor, who packages its Driver as a Connector;
- I was unable to figure out how to get a LocalTransaction or a XAResource from a physical connection;
- I was unable to figure out how to update DBCP in order to support the ManagedConnection interface as pooled instances; more accurately, the PoolableConnectionFactory.makeObject does not take as parameters a JAAS Subject and a ConnectionRequestInfo as required by the specifications; and
- I was unable to figure out how to plug the ManagedConnectionFactory.matchManagedConnection method.
So, I have decided to (re-)implement a connection pool, which was able to address all these points.
I have submitted an (ugly) patch preview (GERONIMO-90) showing how this generic implementation can be used to mount a pool of JDBC connection via the "Connection Management" contract of the JCA specifications. This implementation can also mount a pool of CCI compliant connections. Based on the fact that this perview is perhaps to ugly to be considered, I will clean it and submit a packaged version, say next week.
Regarding DBCP, I think that the pooling capabilities of PreparedStatement will be used.
Gianny
_________________________________________________________________ Trouvez l'�me soeur sur MSN Rencontres http://g.msn.fr/FR1000/9551
