logger.debug("*****************************************************************************Loaded on mgmt agent.");
if (logger.isDebugEnabled()) logger.debug("*****************************************************************************Loaded on mgmt agent.");
    private boolean haveServices() {                    us = (UIDService )            getServiceBroker().getService( this, UIDService.class, null ) ;            if (us == null) {                throw new RuntimeException("Unable to obtain UIDService");            }            //this.logger = (LoggingService)  this.getServiceBroker().getService(this, LoggingService.class, null);            //if (logger == null) {            //    throw new RuntimeException("Unable to obtain LoggingService");            //}            // **********************************************get the nodeId            NodeIdentificationService nodeIdService = (NodeIdentificationService)                getServiceBroker().getService(this, NodeIdentificationService.class, null);            if (nodeIdService == null) {                throw new RuntimeException("Unable to obtain node-id service");            }                        MessageAddress nodeId = nodeIdService.getMessageAddress();            getServiceBroker().releaseService(this, NodeIdentificationService.class, nodeIdService);            if (nodeId == null) {                throw new RuntimeException(                "Unable to obtain node id");            }                        isMgmtAgent = (!nodeId.equals(agentId) );            if (isMgmtAgent) {                logger.debug("*****************************************************************************Loaded on mgmt agent.");            } else {                            logger.debug("*****************************************************************************Loaded on node.");            }                                    if (!isMgmtAgent) {                                //Publish tech spec services to node control service, ONLY if on a node                //& not in the mgmt agent                NodeControlService ncs = (NodeControlService)                    getServiceBroker().getService(this, NodeControlService.class, null);                if (ncs != null) {                    rootsb = ncs.getRootServiceBroker();                    getServiceBroker().releaseService(this, NodeControlService.class, ncs);                } else {                    logger.error("Unable to obtain NodeControlService");                }            } else {                //Just add services to local mgmt agent, so set the root service broker (rootsb) = the local service broker                rootsb = getServiceBroker();            }            // create and advertise our service node-wide            this.dtssp = new DiagnosisTechSpecServiceProvider();            rootsb.addService(DiagnosisTechSpecService.class, dtssp);            // create and advertise our service node-wide            this.atssp = new ActionTechSpecServiceProvider();            rootsb.addService(ActionTechSpecService.class, atssp);            diagnosisTechSpecService =            (DiagnosisTechSpecService) getServiceBroker().getService(this, DiagnosisTechSpecService.class, null);            if (diagnosisTechSpecService == null) {                logger.error(                "Unable to obtain DiagnosisTechSpecService");            }             actionTechSpecService =            (ActionTechSpecService) getServiceBroker().getService(this, ActionTechSpecService.class, null);            if (actionTechSpecService == null) {                logger.error(                "Unable to obtain ActionTechSpecService");            }                         return true;//        }//        else if (logger.isDebugEnabled()) logger.error(".haveServices - at least one service not available!");//        return false;    }