You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Henning P. Schmiedehausen" <hp...@intermeta.de> on 2003/03/03 11:00:10 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.

So you need the logged in user as the user to connect to the database?

Or did I get you wrong?

	Regards
		Henning




>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?

>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org