code: public static List<SessionManager> loadAllSessionManagerFactories() throws SessionServiceException {
      final List<SessionManager> sessionMgrs = new ArrayList();
      final ServiceLoader<SessionManager> loader = ServiceLoader.load(SessionManager.class);
      for (SessionManager sessionMgr : loader) {
        if (!sessionMgr.isClosed()) {
          sessionMgrs.add(sessionMgr);
        }
      }
      return sessionMgrs;
    }
docs: /*
  public static List<SessionManager> loadAllSessionManagers() throws SessionServiceException {
  final List<SessionManager> sessionMgrs = new ArrayList();
  final ServiceLoader<SessionManager> loader = ServiceLoader.load(SessionManager.class);
  for (SessionManager sessionMgr : loader) {
  if (!sessionMgr.isClosed()) {
  sessionMgrs.add(sessionMgr);
  }
  }
  return sessionMgrs;
  }