On 29 Sep 00, at 15:02, Aaron Mulder wrote:
> On Fri, 29 Sep 2000, Dan OConnor wrote:
> > Hi Aaron,
> >
> > If a bean "checks out" a connection from the pool, and doesn't put
> > it back (i.e. doesn't call close), you know that it still has it when
> > the next business method is called. Would it work to just go
> > ahead and enlist it in any new transaction? (There can't be more
> > than one transaction for that bean going at once...)
> >
> > Tracking a list of checked-out resources would also make cleanup
> > easier after a system exception, if we don't do this already. Just a
> > thought...
> >
> > -Dan
>
> There's no way that I know of in Java to get a reference to the
> object that called a particular method. You could get the object type by
> dumping the stack and examining the output, but that isn't really
> enough. Since JNDI doesn't ask that the caller pass in a self-reference,
> how do you suggest we track which bean instance has which connection?
Hi Aaron,
I think the traditional way to do this kind of thing in an application
server is to maintain a thread-local execution context. But I know
what you mean; it's a tricky problem to solve cleanly without
messing up performance.
-Dan
>
> Aaron
>
>