Re: login dependend databases

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Apr 26 2005 - 08:23:59 EDT

  • Next message: Colin Surprenant: "The right tool for integration to existing DB"

    Dirk,

    I have doubts about your setup:

    > Configuration.initializeSharedConfiguration (lvCayenneFileConfig);

    This line sets a singleton configuration object that is shared by all
    users of a given application... Doing it per session seems wrong (even if
    you got your threading right, there will be a significant overhead loading
    XML files on every new session).

    You can actually still use this approach instead of DataDomains, but
    you'll have to avoid setting shared configuration and instead store named
    configurations in some sort of application global map, using your own
    DataContext factory that pulls the right configuraton.

    Andrus

    > Hello Juergen,
    >
    > we've solved this for us using:
    >
    > FileConfiguration lvCayenneFileConfig = new FileConfiguration
    > (lvCayenneConfigFile); lvCayenneFileConfig.addFilesystemPath
    > (lvCayenneConfigDirectory);
    > //System.out.println("--------------------------------->" +
    > lvCayenneFileConfig.getProjectFile().getAbsolutePath());
    > Configuration.initializeSharedConfiguration (lvCayenneFileConfig);
    >
    > where lvCayenneFileConfig points to the Directory and Filename where
    > Cayenne reads the cayennexyz.xml. We've appended the Portalname of the
    > Portal the user has been loged in. So there is a cayenne_info.xml and a
    > cayenne_edi.xml ... and so on.
    >
    > Hope this helps.
    >
    > Regards
    >
    > Dirk



    This archive was generated by hypermail 2.0.0 : Tue Apr 26 2005 - 08:24:00 EDT