Find Database Name Hibernate Session Object Debug Eclipse

Find Database Name Hibernate Session Object Debug Eclipse

If you are working with Hibernate and while debugging the code you want to find which database its using from its session object you could do below:

Grab Session object from debug window –> jdbcConnectionAccess –> connectionProvider –> datasource –> connectionPoolDataSource –> nestedDataSource and expand it you will find database information:

2015-10-09 13_51_46-

2015-10-09 13_52_21-

Leave a Reply

Your email address will not be published. Required fields are marked *