|
From: Seth L. <set...@gm...> - 2005-01-06 18:25:19
|
On Thu, 06 Jan 2005 10:27:35 -0700, Jim Engquist <jd...@ca...> wrote:
>
> 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.
If your setup is something like this, it won't work:
public class Bean {
// marked as REQUIRES
public void doA() {
doB(); // run as REQUIRES_NEW
doB(); // run as REQUIRES_NEW
}
public void doB() {
...
}
}
Because when doB is called from inside doA, it's not going through the
proxy. Therefore, it bypasses the transaction code. Maybe this is
why you're not seeing the behavior you expect?
Seth
--
<a href="http://www.picklematrix.net/foaf.rdf">Seth Ladd's FOAF</a>
<a href="http://www.foaf-project.org/">What is FOAF?</a>
|