ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Lin" <rich...@elfly.com>
Subject Re: Re: how can i use mutiple transction in thread?
Date Fri, 07 Jul 2006 15:21:47 GMT
I believe this can be easily done through opening a real session in
the SqlMapClient where it's actually looking for ThreadLocal in its
openSession method.  The only problem I can see is if one forget to
close the session, it will not return to the throttlePool.

Maybe a weak reference object can help in this case.

On 7/6/06, rs <rustystone@myway.com> wrote:
>
>
> Was actually planning to use SqlMapClient.openSession() myself. The intent, for us at
least, is to have multiple independent transactions in the same thread. For example, one doesn't
want logging messages to be rolled back when main business logic fails. Hence, you need a
new separate transaction (provided by a local session) for the logging.
>
> Not a good news if it does work.
>
>
> ---- On Thu 07/06, Jeff Butler < jeffgbutler@gmail.com > wrote:
>
> > Are you sure about this?  The session is stored as ThreadLocal in
> > SqlMapClientImpl - there is no provision I can see for having more than one
> > open session.  Was that the original intent?
>
>
>
>
> _______________________________________________
> No banners. No pop-ups. No kidding.
> Make My Way  your home on the Web - http://www.myway.com
>
>
>

Mime
View raw message