On Fri, Jul 04, 2008 at 02:16:47PM -0430, Alejandro Galue wrote > Spring people point to use JPA and persistence.xml, because it uses > automatic class adding with @Entity annotations but, neither found how > can use this with AnnotationSessionFactoryBean. > > Any suggestions ? > > Alejandro. >
Although JPA would be helpful if you were building a standalone application, it might not be so helpful in context of openNMS as it is not fesible to make OpenNMS and JPA work cleanly (afaik) following chat log may help ---- <brozow> we use hibernate's 'Criteria' object to so some some query building [08:19] <brozow> and we use a few Hibernate specific annotations to cover things that were not included in the jpa spec [08:19] <geoaxis> i see [08:19] <geoaxis> could you give me an example of some hibernate annotation not included in JPA [08:21] <brozow> sure [08:21] *brozow goes to look [08:21] <geoaxis> i meant : then use of JPA as some thing intermediate might not be possible [08:21] <brozow> jpa doesn't seem to provide a 'DELETE-ORPHAN' cascade [08:24] <brozow> in fact I don't remember that jpa does cascading delete at all [08:24] <geoaxis> brozow: let me check [08:25] <brozow> cd opennms-model/src/main/java/org/opennms/netmgt/model; grep hibernate\.annotation * [08:26] <brozow> oh.. and the 'Where' annotation [08:27] <brozow> as well as a few Collection type annotations [08:27] And with JPA absent you will have to go to applicationContext-dao.xml to add reference to your annotated classes. -- Shahzada Hatim Mushtaq Open Source Software Developer http://hatimonline.com geoaxis on irc.freenode.net hatimonline on skype
signature.asc
Description: Digital signature
------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel