private HibernateTransactionManager buildTransactionManager(
     String name, Config config, DataSource dataSource, JdbcConfig jdbc) {
   return HibernateSessionBuilder.builder()
       .packages(config.getDataSources().get(name))
       .dataSource(dataSource)
       .env(jdbc)
       .build()
       .transactionManager();
 }
  private SessionFactory buildSession(
      String name, Config config, DataSource dataSource, JdbcConfig jdbc) {

    return HibernateSessionBuilder.builder()
        .packages(config.getDataSources().get(name))
        .dataSource(dataSource)
        .env(jdbc)
        .build()
        .sessionFactory();
  }