[infinispan-dev] Setting JGroups channel name

Bela Ban bban at redhat.com
Thu Sep 17 02:53:24 EDT 2009


If you don't define a logical name, JGroups will pick one for you. The 
name will look like {hostname}-{randomShort}, e.g. mybox-12345.

I recommend a good logical name should include
- the function (e.g. "SessionReplication")
- the location (e.g. "mybox")
- if you have multiple instances running on the same box, maybe an ID

Example: SessionCache-mybox-33


Vladimir Blagojevic wrote:
> On 09-09-10 1:41 PM, Mircea Markus wrote:
>> Good point. What we can do is use a placeholder ${nodeName:default}
>> and if one specifies it through -DnodeName will be taken into account.
>> It's much easier going through logs and looking for nodes named:
>> "aaaa", "bbb" and "ccc" rather than host:port1, host2:port2 etc.
>> Actually we even have a script that does that, so that we can debug
>> logs more easily :)
>>
>>
> Yes, but as soon as you have two cache managers in the same VM you are
> screwed, right? We would end up with two channels with the same name.
> Everything would work as far as JGroups is concerned but logs would be
> useless.
>
> Don't forget that channel names need to be unique per JVM and across JVMs!
>
> The only solution I can think of is to add API that allows naming of
> CacheManagers. That name could be reused to name channel as well.

-- 
Bela Ban
Lead JGroups / Clustering Team
JBoss



More information about the infinispan-dev mailing list