Re: cross-vm cache - group name?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jan 07 2005 - 09:19:14 EST

  • Next message: Andrus Adamchik: "Re: How to do GROUP BY dynamically?"

    Hi Tore,

    > Should I make javagroups use another group name or
    > should I customize the address/port?

    You need to set a distinct address/port combination for each "group". IIRC
    this should work without renaming the domain.

    Now if you don't want to repackage the war to change port and address in
    cayenne.xml, you may need to choose a "custom transport" option for remote
    cache synchronization and implement your own subclass of
    JavaGroupsBridgeFactory, overriding "createEventBridge" method to infer
    port/address from the environment using your custom logic.

    Andrus

    > Hello and a happy new year!
    >
    > I am trying my application with cross-vm cache turned on for the first
    > time and have a question.
    >
    > First - my setup: I have a single application packed as a war. We
    > deploy several instances of the same war in a single tomcat instance:
    >
    > server1:
    > customerA.war
    > customerB.war
    >
    > I use a custom JNDIDataSourceFactory that makes customerA.war connect
    > to "java:/customerADS" and customerB.war connect to
    > "java:/customerBDS". A and B are two different databases. This way, all
    > the war-files are identical. customerA should never notify customerB
    > about a cache change.
    >
    > In the future we might buy some more servers and go with a setup like
    > this:
    >
    > server1:
    > customerA.war
    > customerB.war
    > server2:
    > customerA.war
    > customerB.war
    >
    > So customerA on server1 and server2 should notify each other about
    > cache changes, but customerA should never notify customerB.
    >
    > How can I use DataRowStore remote notify in this setup? I would love to
    > *not* use ant to customize the war-files as it is very nice to have
    > equal content in all the war-files.
    >
    > From the documentation: " Synchronization is only done between remote
    > DataDomains with the same name. Note that for JavaGroups configuration,
    > a combination of multicast address and port must be unique for each
    > DataDomain name.". Should I make javagroups use another group name or
    > should I customize the address/port?
    >
    > Regards,
    > - Tore.



    This archive was generated by hypermail 2.0.0 : Fri Jan 07 2005 - 09:19:17 EST