|
From: Rod J. <rod...@in...> - 2003-05-01 21:48:42
|
It's all about "the simplest thing that could possibly work". Let's give it a go. ----- Original Message ----- From: "jürgen höller [werk3AT]" <jue...@we...> To: "Rod Johnson" <rod...@in...>; "Ken Krebs" <kk...@kk...>; "Isabelle Muszynski" <isa...@me...> Cc: <spr...@li...> Sent: Thursday, May 01, 2003 10:43 PM Subject: Re: [Springframework-developer] Demo/tutorial content > I was referring to my previous proposal: > > <quote> > For the web app demo, I'm not sure if we need JTA at all, though. Spring's new transaction support could allow for a different transaction handling strategy in the single resource case. The idea is to handle a transaction via a ThreadLocal JDBC connection and a respective resource lookup strategy in the data access code (first checking the ThreadLocal variable, then the JNDI DataSource). > > This would be analogous to our existing SingleConnectionTransactionManager, just for pooled connections and requiring special consideration at resource lookup. I've been thinking about such a solution for a while, also for Hibernate Session-controlled transactions (and JDO PersistenceManager-controlled ones). We would need to prototype it first, of course. > </quote> > > It's exactly about the scenario you mentioned: Many apps will never use more than one database. > > As I've mentioned above, this strategy should be applicable to standard JNDI resource pools, in contrast to SingleConnectionTransactionManager that just works for the non-pooled SingleConnectionDataSource. It enforces the mentioned lookup strategy, though, but of course this lookup pattern will also work with any other transaction management strategy, as it just checks for a ThreadLocal Connection first and then falls back to a standard JNDI DataSource lookup. > > I will prototype this tomorrow, and I'm curious myself if it will work out as expected! > > Juergen > > > > > -----Ursprüngliche Nachricht----- > Von: Rod Johnson [mailto:rod...@in...] > Gesendet: Do 01.05.2003 23:04 > An: jürgen höller [werk3AT]; Ken Krebs; Isabelle Muszynski > Cc: spr...@li... > Betreff: Re: [Springframework-developer] Demo/tutorial content > > > > > - or use a different PlatformTransactionManager implementation for the > non-JTA single resource case (as I've proposed earlier, I'm gonna prototype > this tomorrow). > > I think this is an interesting approach, which we can support through our > transaction infrastructure. Many simple apps are only ever going to use one > database. > > What about pooling? > > Rod > > > > > NuYzJjz⢙qz~z jz |