Re: Handling multiple databases using Cayenne+Spring

From: Mike Kienenberger (mkienen..mail.com)
Date: Fri Apr 09 2010 - 08:06:50 EDT

  • Next message: Joe Baldwin: "Cache Configuration # - Max Object LRU Cache"

    If you write a custom DataSourceFactory and DataSource, you can have
    your DataSource dynamically choose which connection information to
    provide based on the current user.

    On Thu, Apr 8, 2010 at 11:41 PM, Sudheer <sudheer.tec..mail.com> wrote:
    >
    > Hi Andrus,
    >
    > Thank you for the respone
    >
    > There is little catch in our existing design. Here is the design
    >
    > My application interacts with it Manger applications (could be more than
    > one) that are running either on SQL server or Oracle. Schema is same for
    > both the vendors. Manager application actually holds information about it's
    > database connection.
    >
    > User who is using my application will be one Manager at a time. So, when
    > user login to my application, system connects to the manager he is
    > intereted, bring all connection details and keep them in HTTPSession. For
    > Cayenne, I would like to keep DataContext in HTTPSession so that it will be
    > user specific.
    >
    > I could not understand your previous response. After setting DataSource on a
    > node and keeping DataContext in HttpSession affects all other users as well?
    >
    > What happens on below scenario?
    > Using my application User A can connecto Manager A that is running on SQL
    > Server Database.
    > Using my application User B can connect to Manager B that is running on
    > Oracle.
    >
    > If possible can I have sample code or examples for Spring+Cayenne
    > integration. Unfortunately I am new to Spring as well :(
    >
    > I hope you understand my text :)
    >
    > Thank You
    > Sudheer
    >
    >
    >
    >
    > --
    > View this message in context: http://n3.nabble.com/Handling-multiple-databases-using-Cayenne-Spring-tp699967p707573.html
    > Sent from the Cayenne - User mailing list archive at Nabble.com.
    >



    This archive was generated by hypermail 2.0.0 : Fri Apr 09 2010 - 08:07:55 EDT