[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error: ExternalTransaction in a LocalDatabase



On Fri, 26 Jan 2001, Michael Keuchen wrote:
> Falko Braeutigam wrote:
> > 
> > On Fri, 26 Jan 2001, Michael Keuchen wrote:
> > > Hi!
> > >
> > > I cannot begin an ExternalTransaction on a LocalDatabase with the newest
> > > CVS code
> > > because ExternalTransaction.begin
> > > uses ExternalDatabase.beginTX
> > > uses LocalDatabase.joinTX
> > > which always throws a RuntimeException.
> ...
> >> recently reworked the connection pooling code and found that
> > LocalTransaction.join() did never work correctly. I wasn't sure about the
> > best way to fix this. The exception is there to let you know at least.
> 
> I understand the problem, but I never used the join() method.
> My problem is that transaction.begin() uses (via beginTX) the joinTX()
> method,
> and with the exception thrown it is not even possible to associate 1
> (one) thread to a
> transaction!

Well, I should read your mails more carefully next time. You are right - and
your patch probably fixes the problem. However, since your txHasThread() method
uses keyForElement() which is O(n), I put the check right in
ExternalTransaction where we just need to check the database type. Is this ok?

> 
> > Ok, there are several ways to fix this and I would like to discuss them but
> > first someone has to confirm that he got me anyway ;)
> 
> All O.K.?
I'm not sure :) Don't you think so?


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com