Re: [javagroups-users] TCPPNG#getInitialHosts() ?
Brought to you by:
belaban
From: Bela B. <be...@ya...> - 2007-06-11 07:11:24
|
The one you configured in TCPPING ? Just do: TCPPING.getProperties() and look for "initial_hosts" Hanson Char wrote: > I know...I need the original "initial initial hosts", not just the > current "initial hosts" :) > > Hanson Char > > On 6/10/07, *Bela Ban* <be...@ya... <mailto:be...@ya...>> > wrote: > > I see, added getInitialHosts(). To use: > > ProtocolStack stack=channel.getProtocolStack(); > TCPPING ping=(TCPPING)stack.findProtocol("TCPPING"); > List<Address> initial_hosts=ping.getInitialHosts(); > > Note that initial_hosts is mutable, so you can add or remove > elements. > Or should I make the return value immutable ? > > Hanson Char wrote: > > >What do you want to do exactly ? > > > > I am trying to provide a 2PC activation protocol in ha-jdbc, > such that > > the 2PC Activation procedure will only be started if a > precondition is > > satisfied. The precondition is that every member of the group > > statically configured (via TCPPING) must be available. In other > > words, if any such member is down or unreachable, I'd rather the > 2PC > > to not proceed at all. (Suffice to say the rationale is to provide > > data consistency guarantee with all group members having access > to the > > same database cluster.) > > > > If I understand TCPPING correctly, group members are statically > > configured. So I am thinking one way to check the precondition > is to > > compare the "initial hosts" configured against the members > dynamically > > retrieved from the View (of a JChannel). > > > > Make any sense ? > > > > > > -- > Bela Ban > Lead JGroups / JBoss Clustering team > JBoss - a division of Red Hat > > -- Bela Ban Lead JGroups / JBoss Clustering team JBoss - a division of Red Hat |