Code for hibernate connection example