// set the relevant deployment policy
log.info(" ******* Setting Deployment Policy name : ------> " + lbDataCtxt.getDeploymentPolicy());
loadBalancerCategory.setDeploymentPolicyName(lbDataCtxt.getDeploymentPolicy());
Service lbService = new MultiTenantLBService(lbDataCtxt.getLbCartridgeInfo().getType(), lbDataCtxt.getAutoscalePolicy(),
lbDataCtxt.getDeploymentPolicy(), -1234, lbDataCtxt.getLbCartridgeInfo(),
tenantRange, loadBalancerCategory);
Properties lbProperties = null;
if (lbDataCtxt.getLbProperperties() != null && !lbDataCtxt.getLbProperperties().isEmpty()) {
lbProperties = new Properties();
lbProperties.setProperties(lbDataCtxt.getLbProperperties().toArray(new Property[0]));
}
// create service
lbService.create();
// add LB category to the payload
lbService.getPayloadData().add(CartridgeConstants.LB_CATEGORY, lbDataCtxt.getLbCategory());
// delpoy
lbService.deploy(lbProperties);
// persist
persist(lbService);
}