Re: Reset Cayenne Connection Pool

From: Mike Kienenberger (mkienen..laska.net)
Date: Thu Apr 07 2005 - 15:18:26 EDT

  • Next message: Fredrik Liden: "Getting distinct values from in-memory"

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Hmm... Cayenne pool can auto-reconnect Oracle connections behind the
    > scenes on some (but not all) failures. Could you post the full stack of
    > exception?
    >
    > Anyway, lets discuss the options... Cayenne stack uses standard
    > DataSource interface to obtain connections. Cayenne PoolManager class is a
    > default implementation. So you can do *either* of these:
    >
    > (1) Get a DataSource from DataNode, cast it to PoolManager, call
    > "dispose()", create new PoolManager and set it as a new DataSource of a
    > DataNode.
    >
    > (2) Subclass PoolManager to implement "reset" instead of "dispose", to
    > keep using the same pool.
    >
    > (3) Test your app Apache DBCP connection pool, that has more advanced
    > "auto-reconnect-on-failure" support. It can be used as a replacement of
    > PoolManager. And in 1.2 it is even supported by the Modeler.
    >
    > (1) and (2) have a small window when other threads may get errors while
    > you are handling an error in any one given thread. So if (3) works, it
    > should be a more reliable option...

    (4) Use the Oracle connection pool.
    oracle.jdbc.pool.OracleConnectionCacheImpl? is the class. (Sorry, don't
    have the information currently available).

    -Mike



    This archive was generated by hypermail 2.0.0 : Thu Apr 07 2005 - 15:16:58 EDT