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

From: Tore Halset (
Date: Mon Feb 09 2004 - 02:40:25 EST

  • Next message: Kai Michael Bodach: "Problem by Updating an Object"

    On Feb 8, 2004, at 23:49, Andrus Adamchik wrote:

    > 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.

    No. Perhaps level 3 cache would be nice if we should use multiple JBoss
    servers in the future.

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

    Ah, perfect!

    > 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:
    > . 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...

    Yes, cayenne.jar is bundled with each war-file. I know about the nested
    ClassLoader stuff. So the cache in level 2 are bound to a static field?
    Sounds perfect for our use :)

      - Tore.

    This archive was generated by hypermail 2.0.0 : Mon Feb 09 2004 - 02:40:48 EST