{
backup = false;
String nodeID = server.getNodeID().toString();
TopologyMember member = topology.getMember(nodeID);
//we swap the topology backup now = live
if (member != null)
{
member.getConnector().a = member.getConnector().b;
member.getConnector().b = null;
}
if(backupServerLocator != null)
{
//todo we could use the topology of this to preempt it arriving from the cc
try
{
backupServerLocator.close();
}
catch (Exception e)
{
log.warn("problem closing backup session factory", e);
}
backupServerLocator = null;
}
for (BroadcastGroup broadcastGroup : broadcastGroups.values())
{
try
{
broadcastGroup.start();
broadcastGroup.activate();
}
catch (Exception e)
{
log.warn("unable to start broadcast group " + broadcastGroup.getName(), e);
}
}
for (ClusterConnection clusterConnection : clusterConnections.values())
{
try
{
clusterConnection.activate();
}
catch (Exception e)
{
log.warn("unable to start cluster connection " + clusterConnection.getName(), e);
}
}
for (Bridge bridge : bridges.values())
{
try
{
bridge.start();
}
catch (Exception e)
{
log.warn("unable to start bridge " + bridge.getName(), e);
}
}
for (ClusterTopologyListener listener : clientListeners)
{
listener.nodeUP(nodeID, member.getConnector(), false, member.getDistance());
}
for (ClusterTopologyListener listener : clusterConnectionListeners)
{
listener.nodeUP(nodeID, member.getConnector(), false, member.getDistance());
}
}
}