if (!cluster.isResourceRefExists(jndiName)) {
// create new ResourceRef as a child of Cluster
cluster.createResourceRef(enabled, jndiName);
// create new ResourceRef for all instances of Cluster
Target tgt = targetProvider.get();
List<Server> instances = tgt.getInstances(target);
for (Server svr : instances) {
if (!svr.isResourceRefExists(jndiName)) {
svr.createResourceRef(enabled, jndiName);
}
}