Re: 1.1-cache and multiple DataDomains with the same name

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Feb 08 2004 - 17:49:13 EST

  • Next message: Andrus Adamchik: "[ANN] Cayenne 1.1 Alpha Preview 2 (with examples)"

    Hi Tore,

    Ok, so with your setup the goal is to avoid "pollution" of DataDomains
    with the data from a different DB, and take advantage of the Level 2
    cache at the same time. You probably don't care about Level 3 cache
    with a single instance per DB anyway.

    Good news is that it looks like 1.1 will just work as is. Having said
    that, here is your options:

    1. Use a unique DataDomain name for each deployed instance, and only
    use level 2 cache. To do renaming on deployment you can use cdeploy Ant
    task: http://objectstyle.org/cayenne/userguide/deploy/cdeploy.html .
    This is the cleanest approach IMO, and you can also combine it with
    your DataSource replacement logic.

    2. Keep doing what you are doing now, just enable level 2 cache. I
    understand that "cayenne.jar" is bundled with each "*.war" file,
    instead of sitting in a shared location on the server, right? So it is
    loaded for each app via application ClassLoader, meaning that even
    though technically different instances are on the same VM, two
    applications would behave as if they were deployed on separate VMs.
    Nested ClassLoader magic...

    Andrus

    On Feb 8, 2004, at 3:54 PM, Tore Halset wrote:
    > Hello.
    >
    > We deploy several instances of the same cayenne-based web-application
    > in a single jboss instance. One instance for each of our clients.
    > Every application is a single war-file and connect to a separate
    > database for the given client. I have created a custom
    > DataSourceFactory that uses the war-file-name and a config-file to
    > determine which JNDI DataSource to use. It works very well, but I am
    > looking into the new cache in cayenne-1.1.
    >
    > Will the level 2 and 3 cache in cayenne-1.1 work for our setup? The
    > challenge is that we run several caynne applications in the same
    > java-wm with the same DataDomain name. Or perhaps it is something very
    > wrong with our setup.
    >
    > Regards,
    > - Tore.



    This archive was generated by hypermail 2.0.0 : Sun Feb 08 2004 - 17:49:19 EST