directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <aok...@bellsouth.net>
Subject RE: [bdbje] Using a ThreadLocal to find a Transaction
Date Sun, 18 Apr 2004 20:49:23 GMT
Yeah I agree completely.  That's most likely the direction I intend to 
take on this one.

Alex

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: Sunday, April 18, 2004 4:26 PM
> To: Apache Directory Developers List
> Cc: bdbje@sleepycat.com
> Subject: RE: [bdbje] Using a ThreadLocal to find a Transaction
> 
> > 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