Dear Gehel & nbhatia
Here's mine ... public class ActorTable { public void testMe() { Person person = Person.Factory.newInstance(); // Person is subclass of Actor System.out.println(" * * * Building target <Person> object * * *"); Configuration cfg = new Configuration() .addClass(net.justtrade.realworld.persistence_layer.Actor.class) .setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLDialect") .setProperty("hibernate.connection.url", "jdbc:mysql://localhost:3306/vouchers") .setProperty("hibernate.connection.driver_class", "com.mysql.jdbc.Driver") .setProperty("hibernate.connection.username", "mv") .setProperty("hibernate.connection.password", "andromda") ; SessionFactory sessFact = cfg.buildSessionFactory(); HibernateTemplate template = new HibernateTemplate(sessFact); template.setExposeNativeSession(true); PersonDaoImpl persDao = new PersonDaoImpl(); persDao.setHibernateTemplate(template); persDao.openMySession(); person = (Person) persDao.create("Matilda", "Marketmaker"); persDao.releaseMySession(); System.out.println("Person is " + person.getFirstName() + " " + person.getPrincipalName()); } } ... and this created within my eclipse test, and preceding the AndroMDA generated one in the class path... package net.justtrade.realworld.persistence_layer; /** * @see net.justtrade.realworld.persistence_layer.Person */ public class PersonDaoImpl extends net.justtrade.realworld.persistence_layer.PersonDaoBase { private org.hibernate.Session session; public void openMySession() { session = super.getSession(); } public void releaseMySession() { System.out.println("*************** Killing it? *****************"); super.releaseSession(session); } } It compiles and runs without error. It just won't send the poxy commit! :x And I can't tell whether it's because closing the session doesn't necessarily mean sending a commit, or whether I'm closing a different session. Quote: Do you have an public accessor to the HibernateTemplate generated on your DAO ? (end of quote) Your xyzDAOBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport from the Spring Framework. http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/orm/hibernate3/support/HibernateDaoSupport.html -- Regards, Hasan _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3458#3458 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