2

I am using Hibernate inside application already having initialized jdbc connection. How can i tell hibernate use it?

I saw SessionFactory#openSession(Connection connection) in 3.x javadoc but there is not this function in Hibernate 4.1 .

1 Answer 1

3

Found the solution:

sessionFactory.withOptions().connection(Connection conn).openSession()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.