changed from spring jdbc to hibernate