Anton Tagunov wrote:
Hello Peter!

PD> -- Deprecate Excalibur/Cornerstone DataSource as it can be replaced with
PD> wrappers around DBCP which seems to be high enough quality, better unit PD> tested and actively maintained.


Just a small note, have just looked at the code


Bear in mind *BOTH* DBCP and Excalibur DataSource work. Cocoon and I believe JAMES are both using Excalibur's version.

3)

java.org.apache.commons.dbcp.jdbc2pool.JDBC2PoolDataSource

    however did not seem mature to me. it looks like is being
    under development (there is one test case failing for it)

    it to tell you my impression, they've just got into a mess
    with the username/password handling there.


You might ask them about it.


4) To go into more detail,

java.org.apache.commons.dbcp.PoolingDataSource

has got a very elegant method

public Connection getConnection(String uname, String passwd) throws SQLException {
throw new UnsupportedOperationException();
}
:-))


    I'm not being sarcastic, I really think it is ellegant,
    this takes away a ton of problems: we specify the
    username/password once when the PoolingDataSource is
    created/configured and then it keeps being used. All is fine.

Essentially, that is what the Excalibur pooling does. It just doesn't offer that method.


5) However, as soon as we try to support

getConnection( uname, passwd ) in the pooling setup

    it gets close to a nightmare. Anyway, JDBC2PoolDataSource
    targeted to implement this has still a way to go, IMO

To add to that nightmare, I also have an additional requirement for a current App that I'm writing where each Connection to the database needs a role set *after* the user has been authenticated. I can accomplish this by subclassing Excalibur's DataSource, and hacking a little. I haven't looked at DBCP though.


6)


    I was just about to attach DataSource-s to my Fortress
    application, and to tell the truth, I had avalon-excalibur
    data source components in mind. However now I'm considering
    wrapping something from DBCP. It should be PoolingDataSource,
    I beleive? Are we ever going to have a getConnection( u, p )
    supported? Do we need it? If yes, DBCP team looks like
    being in a need of help ;-)

:) You can try both. In fact, it would be nothing to wrap a facade using the Excalibur component's interface and DBCP's implementation. That way you can test the differences without having to change a stitch of code in your application.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to