protected List watchResourceManagers(Collection resourceManagers) {
if( resourceManagers instanceof ReferenceCollection ) {
List copy;
synchronized (resourceManagers) {
copy = new ArrayList(resourceManagers);
((ReferenceCollection)resourceManagers).addReferenceCollectionListener(new ReferenceCollectionListener() {
public void memberAdded(ReferenceCollectionEvent event) {
ResourceManager resourceManager = (ResourceManager) event.getMember();
recoverResourceManager(resourceManager);
}