Re: Handling multiple databases using Cayenne+Spring

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Apr 08 2010 - 09:40:33 EDT

  • Next message: Andrus Adamchik: "Re: Handling multiple databases using Cayenne+Spring"

    You can.

    On Apr 8, 2010, at 4:26 PM, Sudheer wrote:

    >
    > Can we implement without customizing DataSourceFactory? Because entire
    > connection related information is in an object that is part of
    > HTTPSession.
    > getDataSource method only takes String parameter.

    A factory can be smart about that, getting this info from a thread
    local or something.

    > Can I have empty xxxx.driver.xml configured and attach DataSource
    > dynamically to the node?

    You can use DataNode.setDataSource(..). You may still want create a
    custom factory that does nothing to make sure Cayenne starts without
    errors.

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Apr 08 2010 - 09:41:18 EDT