Omer-Pitou
asked on
Hibernate 5.1: Is a way to get a connection
Hi,
Is there a way to get a connection from Hibernate 5.1 session object?
I am looking forward to hearing from you.
Is there a way to get a connection from Hibernate 5.1 session object?
I am looking forward to hearing from you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What I wanted was to get a Connection from the pool maintained by Hibernate, for my jasperreporats and some key Stored procedures I was running with createSQLQuery. With this, I had the impression I was loosing some performance yield by prepared callable statement.
Then, I found this
HibernateUtil.getSessionFa
@Override
public void execute(Connection connection) throws SQLException {
if (call == null) {
String sql = "";
call = connection.prepareCall(sql
}
}
});