directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: [bdbje] Using a ThreadLocal to find a Transaction
Date Sun, 18 Apr 2004 20:25:34 GMT
> If you use the "base API" (which I think you're doing), there is no such
> notion of current transaction as you correctly point out.  Certainly
> using ThreadLocal is an option and I'm going to think carefully about
> that.  One thing that comes to mind is how we specify to use ThreadLocal
> in the API.  Currently, passing null as the txn parameter means Auto
> Commit.

If your interface passes the transaction as a explicit parameter it would be
easier to have an adapter (either in your code or client code) such that:

 a() -> set thread local
        b()
 b() -> c()
 c() -> get thread local
        d(..., transaction, ...)

The adapter layer would parallel the Base API without the explicit
transaction parameter.

	--- Noel


Mime
View raw message