ClusterServesLogicProvider cluster = bindingSite.getClusterServesLogicProvider(); RootPlan rootplan = (RootPlan) bindingSite.getXPlanForDomain("root"); if (rootplan == null) { throw new RuntimeException("Missing \"root\" domain plan!"); } MessageAddress self = cluster.getMessageAddress(); PlanningFactory ldmf = (PlanningFactory) cluster.getFactory("planning");
PlanningFactory ldmf = (PlanningFactory) domainService.getFactory("planning");
  protected void loadLPs() {    DomainBindingSite bindingSite = (DomainBindingSite) getBindingSite();    if (bindingSite == null) {      throw new RuntimeException(          "Binding site for the domain has not be set.\n" +          "Unable to initialize domain LPs without a binding site.");    }     ClusterServesLogicProvider cluster =       bindingSite.getClusterServesLogicProvider();    RootPlan rootplan = (RootPlan)       bindingSite.getXPlanForDomain("root");    if (rootplan == null) {      throw new RuntimeException("Missing \"root\" domain plan!");    }    MessageAddress self = cluster.getMessageAddress();    PlanningFactory ldmf = (PlanningFactory) cluster.getFactory("planning");    if (ldmf == null) {      throw new RuntimeException("Missing \"planning\" factory!");    }    GLMFactory glmFactory = (GLMFactory) cluster.getFactory("glm");    addLogicProvider(new ReceiveTransferableLP(rootplan, ldmf));    addLogicProvider(new TransferableLP(rootplan, self, ldmf));    addLogicProvider(new DetailRequestLP(rootplan, self, glmFactory));    addLogicProvider(new OPlanWatcherLP(rootplan, ldmf));  }