View new_view;
Address other_coord=other_coords != null? (Address)other_coords.elementAt(0) : null;
if(log.isInfoEnabled()) log.info("other_coord = " + other_coord);
try {
MethodCall call=new MethodCall("handleMerge", new Object[]{gms.view_id, gms.mbrs.getMembers()},
new String[]{ViewId.class.getName(), Vector.class.getName()});
new_view=(View)gms.callRemoteMethod(other_coord, call, GroupRequest.GET_ALL, 0);
}
catch(Exception ex) {
if(log.isErrorEnabled()) log.error("timed out or was suspected");
return;
}
if(new_view == null) {
if(warn) log.warn("received a Merge Denied");
gms.passDown(new Event(Event.MERGE_DENIED));
return; //Merge denied
}
//Flushing my old view
gms.flush(gms.mbrs.getMembers(), null);
MethodCall call=new MethodCall("handleViewChange", new Object[]{new_view.getVid(), new_view.getMembers()},
new String[]{ViewId.class.getName(), Vector.class.getName()});
gms.callRemoteMethods(gms.mbrs.getMembers(), call, GroupRequest.GET_ALL, 0);
gms.becomeParticipant();
if(log.isInfoEnabled()) log.info("merge done");
}