#7 Need ConnectionFactory

closed
nobody
None
5
2007-01-02
2005-05-31
Anonymous
No

My project needs to execute a SQL string once just
after a Connection is established to the database -- an
overrideable ConnectionFactory would provide a logical
extension point for this.

The alternative would be to specify the SQL string as the
test on checkout, but this is less than ideal.

I am at: adam.maass@veritas.com

Discussion

  • Steve Waldman
    Steve Waldman
    2005-06-01

    Logged In: YES
    user_id=175530

    Adam,

    You can do this. c3p0's ConnectionFactories are just
    DataSources. Write whatever DataSource you'd, then use
    DataSources.pooledDataSource( DataSource unpooledDataSource,
    PoolConfig config ) to get your c3p0 pooling DataSource.

    ...good luck!

    Steve

     
  • Steve Waldman
    Steve Waldman
    2007-01-02

    • status: open --> closed
     
  • Steve Waldman
    Steve Waldman
    2007-01-02

    Logged In: YES
    user_id=175530
    Originator: NO

    You can now also do this with ConnectionCustomizers.