Re: Multiple datasources for a map

From: andrus (andru..bjectstyle.org)
Date: Sat May 04 2002 - 13:27:42 EDT

  • Next message: Robert John Andersen: "Re: EQUAL_TO with CHAR problem in Oracle"

    This is supported by Cayenne and can be done by configuring multiple
    domains, each with a single node pointing to its own DataSource.
    DataContexts will be obtained by a session by first looking for a domain in
    COnfiguration.getSharedConfig() object by a name depending on some parameter
    (user name?). The only problem is reusing the map. It normally belongs to a
    domain. So if multiple domains have the same map, you will need to trick
    Cayenne. For instance you may have just a single map file, but reference it
    from cayenne.xml multiple times - once for each domain.

    Hope this works for you. (It should if I understand correctly that this is a
    multiuser application with a limited number of user names?)

    Andrus

    Robert John Andersen writes:

    > Wanted to explain a little more because its not as complicated as what
    > it seems. I'm using oracle and I need to only change the
    > user/password/sid depending on who is executing the code.
    >
    > On Fri, 2002-05-03 at 22:05, Robert John Andersen wrote:
    >
    > I need multiple datasources for a map and the ability to switch
    > between the datasources depending on the user/session executing
    > queries. Is this possible and if so how would you go about doing
    > it?
    >
    > RJA
    >
    >
     



    This archive was generated by hypermail 2.0.0 : Sat May 04 2002 - 13:27:46 EDT