public ModelService getModelService ( String serviceName ) { ModelService service = null ; try { service = getDirectoryServiceClient ( ) . lookupService ( serviceName ) ; } catch ( ServiceException se ) { if ( se . getErrorCode ( ) == ErrorCode . SERVICE_DOES_NOT_EXIST ) { LOGGER . error ( se . getMessage ( ) ) ; } else { LOGGER . error ( "Error when getModelService" , se ) ; } throw se ; } return service ; }
Get the ModelService by service name .