On Tue, Sep 08, 2009 at 10:41:20AM +0200, Sophana K wrote:
> >   The only place I could suspect is the call dbConnection.getConnection()
> > in Transaction.__init__().
> >
> I don't understand how this code works.
> Why is the transaction stored into the threadlocal (in doInTransaction)?

   To allow different threads to assign different connections to one
ConnectionHub instance.

> Why doesn't the transaction stay local to the doInTransaction function?

   So that the transaction is propagated to all classes that use the
ConnectionHub instance.

> >> I forgot to say. It looks that once this happened once, all upcoming
> >> transactions fail the same way.
> Why do I have to restart my application to stop this?

   How could I guess?..

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to