Re: dynamic switching between 2 DBs

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Jan 19 2005 - 11:41:52 EST

  • Next message: Mike Kienenberger: "Re: Testing Spring + Cayenne Integration / Architectural Doubts"

    Joshua Pyle <joshua.t.pyl..mail.com> wrote:
    > I'm also interested in this. For me its at startup, I want to
    > dynamically connect to a DB based on the server. I have not seen a
    > way in Cayenne to change the connection info dynamically.

    You can use the following to change what database you're connecting to
    programmatically.

    http://objectstyle.org/cayenne/api/cayenne/org/objectstyle/cayenne/access/DataNode.html#setDataSource(javax.sql.DataSource)

    There's probably additional issues if you're actively switching between two
    databases.

    -Mike



    This archive was generated by hypermail 2.0.0 : Wed Jan 19 2005 - 11:41:48 EST