* associated with the <code>beanClusteringInfo</code>'s <code>FamilyWrapper</code> to
* reflect the new cluster topoloyg, and rebinds the reference in JNDI.
*/
public void clusterTopologyChanged(ProxyClusteringInfo beanClusteringInfo)
{
JndiReferenceBindingSet bindings = null;
BeanClusteringRegistryInfo registryEntry = bindingsByContainer.get(beanClusteringInfo.getContainerName());
if (registryEntry != null)
{
bindings= registryEntry.bindings;
}
if (bindings == null)
{
// We aren't handling this bean
return;
}
Context context = bindings.getContext();
FamilyClusterInfo fci = beanClusteringInfo.getFamilyWrapper().get();
String familyName = fci.getFamilyName();
for (JndiReferenceBinding binding : bindings.getDefaultRemoteBindings())
{
RefAddr refAddr = getFirstRefAddr(binding.getReference(), ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_FAMILY_NAME);
if (refAddr != null && familyName.equals(refAddr.getContent()))
{
redecorateReferenceForClusteringTargets(binding.getReference(), fci);
rebind(context, binding.getJndiName(), binding.getReference());
}
}
for (JndiReferenceBinding binding : bindings.getHomeRemoteBindings())
{
RefAddr refAddr = getFirstRefAddr(binding.getReference(), ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_FAMILY_NAME);
if (refAddr != null && familyName.equals(refAddr.getContent()))
{
redecorateReferenceForClusteringTargets(binding.getReference(), fci);
rebind(context, binding.getJndiName(), binding.getReference());
}
}
for (Set<JndiReferenceBinding> businessBindings : bindings.getBusinessRemoteBindings().values())
{
for (JndiReferenceBinding binding : businessBindings)
{
RefAddr refAddr = getFirstRefAddr(binding.getReference(), ClusteredProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_CLUSTER_FAMILY_NAME);
if (refAddr != null && familyName.equals(refAddr.getContent()))