/** * c-tor */ public HikariConnectionProvider() { this.hcfg = null; this.hds = null; if (Version.getVersionString().substring(0, 5).compareTo("4.3.6") >= 1) { LOGGER.warn("com.zaxxer.hikari.hibernate.HikariConnectionProvider has been deprecated for versions of " + "Hibernate 4.3.6 and newer. Please switch to org.hibernate.hikaricp.internal.HikariCPConnectionProvider."); } }
/** * Inits the plugin. * * @param original the original */ // call initializePlugin and setup version and EJB flag private static void initPlugin(EntityManagerFactory original) { ClassLoader appClassLoader = original.getClass().getClassLoader(); String version = Version.getVersionString(); PluginManagerInvoker.callInitializePlugin(Hibernate3JPAPlugin.class, appClassLoader); PluginManagerInvoker.callPluginMethod(Hibernate3JPAPlugin.class, appClassLoader, "init", new Class[] { String.class, Boolean.class }, new Object[] { version, true }); }
private static void initPlugin(EntityManagerFactory original) { ClassLoader appClassLoader = original.getClass().getClassLoader(); String version = Version.getVersionString(); PluginManagerInvoker.callInitializePlugin(HibernatePlugin.class, appClassLoader); PluginManagerInvoker.callPluginMethod(HibernatePlugin.class, appClassLoader, "init", new Class[]{String.class, Boolean.class}, new Object[]{version, true}); }
@BeforeClass public static void setup() throws Exception { String[] version = Version.getVersionString().split("\\."); boolean version52OrGreater = Integer.valueOf(version[0]) == 5 && Integer.valueOf(version[1]) >= 2; if (version52OrGreater) { entityManagerFactory = Persistence.createEntityManagerFactory("TestPU52"); } else { entityManagerFactory = Persistence.createEntityManagerFactory("TestPU"); } }