List of usage examples for org.hibernate.engine.spi SessionFactoryImplementor openStatelessSession
StatelessSession openStatelessSession();
From source file:org.babyfish.hibernate.dialect.OracleDistinctLimits.java
License:Open Source License
public static void install(SessionFactoryImplementor sfi) { if (!SettingsFactory.isDistinctRankCreateable(sfi.getProperties())) { return;//from w ww . j a v a2s . c om } LOGGER.info(LOGGER_RESOURCE.tryToCreateAnalyticFunction(SettingsFactory.CREATE_ORACLE_DISTINCT_RANK, "true", DISTINCT_RANK)); StatelessSession sls = sfi.openStatelessSession(); try { Connection con = ((SessionImplementor) sls).connection(); installPLSQLWrapper(con); } catch (SQLException ex) { throw new QueryException(ex); } catch (IOException ex) { throw new HibernateException("Can not install the installable dialect", ex); } finally { sls.close(); } }