refactoring, upgraded spring to 4.0.0, changed data model to use jpa and dao to use entity manager.