Wednesday, May 4, 2016

Get connection information from entity manager in hibernate

Connection session = (getDbHelperDao().getEm().unwrap(Session.class)).connection();
System.out.println(session.getMetaData().getURL());

No comments:

Post a Comment