Setting properties programmatically in Hibernate

The code snippet you showed is what you need. Just use your existing configuration instead of creating a new one.

If it is not you who instantiates the configuration (but, for example, spring), you’d need to extend the class that creates it.

Leave a Comment