List of usage examples for org.hibernate StatelessSession connection
@Deprecated Connection connection();
From source file:org.openbravo.service.db.DalConnectionProvider.java
License:Open Source License
public Connection getTransactionConnection() throws NoConnectionAvailableException, SQLException { final StatelessSession session = SessionFactoryController.getInstance().getSessionFactory() .openStatelessSession();//from ww w . j a va 2s.com Connection conn = session.connection(); if (conn == null) { throw new NoConnectionAvailableException("Couldnt get an available connection"); } conn.setAutoCommit(false); return conn; }