Re: JGroups Configuration Questions

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Oct 11 2010 - 11:11:31 UTC

  • Next message: Andrus Adamchik: "Re: maven-cayenne-plugin cgen issue"

    On Oct 8, 2010, at 3:51 AM, Steve Springett wrote:

    > 1) It appears that simply setting remote=true and
    > setting cayenne.JavaGroupsBridge.mcast.port={port#} is all that's required.
    > Is this true?

    Yes, setting it up in the Modeler should be enough in most cases.

    > 2) Will the Cayenne JGroups cluster and my own existing JGroups cluster
    > conflict with one another? Is there any benefit (and a way) to get them both
    > in the same cluster (same channel name)?

    Should be no conflict if you specify different address/port, although I haven't tried running multiple JGroups stacks at once, so there may be some unobvoius issues. The easiest way to verify it is to try.

    The benefit of a shared config is more efficient resource use. JGroups starts a bunch of threads and sends around a bunch of messages to keep the cluster together.

    > 3) Besides configuring jgroups in cayenne.xml, is there a way to
    > programaticly configure jgroups support in Cayenne. For example, I would
    > like the port numbers to be dynamically generated so that the only thing
    > required for cache syncing between nodes is to deploy the war. I won't want
    > the user to have to configure jgroups ports in two different places with two
    > different values for each.

    Sure. An instance of JavaGroupsBridge can be registered with the shared EventManager (obtained via DataDomain.getEventManager()) programmatically. Check org.apache.cayenne.access.DataRowStore for an example.

    Andrus



    This archive was generated by hypermail 2.0.0 : Mon Oct 11 2010 - 11:12:05 UTC