code: public void initSessionFactories() {
      if (sessionFactories == null) {
        sessionFactories = new HashMap<Class<?>, SessionFactory>();
  
        if (usingRelationalDatabase) {
          initDbSqlSessionFactory();
        }
  
        addSessionFactory(new GenericManagerFactory(EntityCache.class, EntityCacheImpl.class));
      }
  
      if (customSessionFactories != null) {
        for (SessionFactory sessionFactory : customSessionFactories) {
          addSessionFactory(sessionFactory);
        }
      }
    }
docs: session factories ////////////////////////////////////////////////////////