code: public Session getOpenSession() {
          Session openSession = getSession();
          if (openSession != null && openSession.isOpened()) {
              return openSession;
          }
          return null;
      }
docs: Returns the current Session that's being tracked if it's open,
  otherwise returns null.
  
  @return the current Session if it's open, otherwise returns null