How to get jdbc connection from hibernate session? [duplicate]

Here is how you can use it:

session.doWork(new Work() {
    @Override
    public void execute(Connection connection) throws SQLException {
        //connection, finally!
    }
});

Leave a Comment