Re: Multiple datasources for a map

From: Robert John Andersen (robert_anderse..ridge-point.com)
Date: Sat May 04 2002 - 14:42:53 EDT

  • Next message: Robert John Andersen: "Q about posting to this list."

    It is a mulituser application but the user names are only limited by
    customers we have. We have a separate schema for each customer, so that
    every time we add a new customer we need a new datasource.

    On Sat, 2002-05-04 at 13:27, andrus wrote:

        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 - 14:50:49 EDT