changed to make it run on jboss and hibernate