|
From: Juergen H. <ju...@in...> - 2005-01-06 20:24:00
|
Transaction suspension should work with all of Spring's local transaction managers too, including HibernateTransactionManager. It's even simpler than in the JTA case: no need for special server-specific setup. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Jim Engquist Sent: Thursday, January 06, 2005 6:28 PM To: spr...@li... Subject: [Springframework-developer] PROPAGATION_REQUIRES_NEW and JTA Hi Folks, I'm wondering if it's possible to use PROPAGATION_REQUIRES_NEW *without* using JTA. I'm trying to use PROPAGATION_REQUIRES_NEW with the following simple setup (using spring-framework-1.1): HibernateTransactionManager whose sessionFactory is a LocalSessionFactoryBean, and the sessionFactory dataSource is a JDBC DriverManagerDataSource. This isn't yielding the results I want yet. I don't get any exceptions or obvious error output, but I don't get the transactional behavior I expect either. I'll need to do further work to diagnose, but first I just want to make sure that such a configuration is intended to work. Based on this post from Colin Sampaleanu, I suspect that JTA may be required: ---- REQUIRES_NEW actually just suspends the current transaction, and then starts a new, unrelated transaction transaction to run the contained code in. If you commit the inner, new transaction, then rollback the outer, the inner transaciton will still be committed, as they are unrelated. This should work properly inside any JTA environment (as long as spring can get at the jta transaction manager) and the model is also essentially the same as the requires new support in the EJB spec. ---- Thanks for listening, Jim Engquist ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |