@Override public List<Application> findAll() throws ServiceException {
  try {
    logger.debug("start findAll");
    List<Application> listApplications=applicationDAO.findAll();
    for (    Application application : listApplications) {
      application.setServer(serverService.findByApp(application));
      application.setModules(moduleService.findByAppAndUser(application.getUser(),application.getName()));
    }
    logger.debug("ApplicationService : All Applications found ");
    return listApplications;
  }
 catch (  PersistenceException e) {
    logger.error("Error ApplicationService : error findAll Method : " + e);
    throw new ServiceException(e.getLocalizedMessage(),e);
  }
}

@ Override public List < Application > findAll ( ) throws ServiceException { try { logger . debug ( "start findAll" ) ; List < Application > listApplications = applicationDAO . findAll ( ) ; for ( Application application : listApplications ) { application . setServer ( serverService . findByApp ( application ) ) ; application . setModules ( moduleService . findByAppAndUser ( application . getUser ( ) , application . getName ( ) ) ) ; } logger . debug ( "ApplicationService : All Applications found " ) ; return listApplications ; } catch ( PersistenceException e ) { logger . error ( "Error ApplicationService : error findAll Method : " + e ) ; throw new ServiceException ( e . getLocalizedMessage ( ) , e ) ; } }
method useful for logs and monitoring management
