If anyone is following this (?) I've managed to squeeze a commit out my DAOImpl by changing the code to this...
public void openMyTransaction() { System.out.println("*************** Opening it. *****************"); session = super.getSession(); xaction = session.beginTransaction(); } public void closeMyTransaction() { System.out.println("*************** Closing it. *****************"); xaction.commit(); session.flush(); } ... followed by ... persDao.openMyTransaction(); person = (Person) persDao.create("Matilda", "Marketmaker"); persDao.closeMyTransaction(); So that eliminates the last question in my previous post. I'm committing a different transaction, from the one with the insert. ¿How can I get a handle on the DAO's transaction? Well I do understand that the whole thing is being handled by Spring AOP. I was hoping to side step that but I no longer think it's feasable. I have to figure out how to get this stuff from the applicationContext.xml into my tests, correct .... <!-- Service Transactional Interceptor --> <bean id="serviceTransactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager"><ref bean="transactionManager"/></property> <property name="transactionAttributeSource"> <value> net.justtrade.realworld.business_layer.ActorManager.createActor=PROPAGATION_REQUIRED net.justtrade.realworld.business_layer.ActorManager.createPerson=PROPAGATION_REQUIRED </value> </property> </bean> <!-- ActorManager Service Implementation --> <bean id="actorManagerTarget" class="net.justtrade.realworld.business_layer.ActorManagerImpl"> </bean> <!-- ActorManager Service Proxy --> <bean id="actorManager" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="target"><ref bean="actorManagerTarget"/></property> <property name="proxyInterfaces"> <value>net.justtrade.realworld.business_layer.ActorManager</value> </property> <property name="interceptorNames"> <list> <value>serviceTransactionInterceptor</value> <value>hibernateInterceptor</value> </list> </property> </bean> -- Regards, Hasan _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3460#3460 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