As many of us dont know that we can get the database metadata information from hibernate session, below sample code will help us to get the db metadata information.
ConnetionInfo.java class which will implement the hibernate jdbc work interface and override the execute method with connection object...