I very much want to test my DAOs, first in Eclipse.
I have created a test jig in Eclipse and refer to my core & common jars in my class path. I had thought I could set up a Configuration, get it to build me a SessionFactory, then stuff the factory into my DAO and go play. That's probably fine for queries. But, when I try MyDAO.create("Chaos"), I have so far found no way to commit the insert. MyDAO.getHibernateTemplate().flush() looks like it should work, but nope. You say in the Tips & Tricks page (#Beware of lazy loading!) ... Quote: ... each time you invoke a method on a Spring Service, a Hibernate Session is opened at the beginning and closed at the end of the call. (end of quote) Can you suggest a simple way to convince the DAO to close it's session? Failing that, do I have to go through Spring's PlatformTransactionManager rigamarole? -- Regards, Hasan _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3447#3447 Posting to http://forum.andromda.org/ is preferred over posting to the mailing list! ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user