I believe the pool name is getting passed in properly because if I try to delete a pool that does not exist, then I get an error stating that.
iControl.LocalLBPoolBindingStub lblpool =
(iControl.LocalLBPoolBindingStub) new iControl.LocalLBPoolLocator
().getLocalLBPoolPort(new java.net.URL(endpoint));
lblpool.setTimeout(IDLE_TIMEOUT);
String poolName =
ActionRequestUtils.resolveStringParam(anActionRequest, "poolName");
// The following line is how you create an empty pool without members.
iControl.CommonIPPortDefinition[][] member =
new iControl.CommonIPPortDefinition[1][0];
iControl.LocalLBLBMethod lb_method =
iControl.LocalLBLBMethod.LB_METHOD_ROUND_ROBIN;
iControl.LocalLBLBMethod[] lbMethods =
new iControl.LocalLBLBMethod[]{lb_method};
if (create) {
lblpool.create(new String[]{poolName}, lbMethods, member);
// Now set a default monitor association
iControl.LocalLBMonitorRule monitorRule = new iControl.LocalLBMonitorRule();
monitorRule.setMonitor_templates(new String[]{"gateway_icmp"});
// monitorRule.setQuorum(quorum);
monitorRule.setType(LocalLBMonitorRuleType.MONITOR_RULE_TYPE_SINGLE);
iControl.LocalLBPoolMonitorAssociation monitorAssociation = new
iControl.LocalLBPoolMonitorAssociation(); monitorAssociation.setPool_name
(poolName);
monitorAssociation.setMonitor_rule(monitorRule);
iControl.LocalLBPoolMonitorAssociation[] monitorAssociations = new
iControl.LocalLBPoolMonitorAssociation[]{monitorAssociation};
lblpool.set_monitor_association(monitorAssociations);
} else
lblpool.delete_pool(new String[]{poolName});
}