You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Jeffrey D. Brekke" <jb...@wi.rr.com> on 2003/02/28 05:51:00 UTC
Re: Passing TurbineUser info to the database
"Quinton McCombs" <qm...@nequalsone.com> writes:
> I have need to pass the username of the person logged into my
> application to the database. The only way that I can see to really
> accomplish this is to call a stored procedure immediately after
> obtaining a pooled connection and calling it again when the connection
> is released to clear the name.
>
> I would need to modify Torque to call my "handler" class after the
> connection is obtained from the pool but before it is returned from
> Torque.getConnection(). The problem is how does the code in my handler
> class obtain a reference to the current TurbineUser for the thread??? I
> have been thinking about using java.lang.ThreadLocal inside of my
> handler class to store the current user. I would set the user inside of
> the session validator.
>
> Has anyone else implemented anything like this? Any thoughts on how I
> am thinking about implementing it?
This is very interesting, we have a similar login situation where we
work that I never bothered to figure out how to get working with
Turbine. Sounds like it would work.
--
=====================================================================
Jeffrey D. Brekke jbrekke@wi.rr.com
Wisconsin, USA brekke@apache.org
ekkerbj@yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org