Integration with spring and hibernate