gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] gmPG2


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] gmPG2
Date: Mon, 5 Feb 2007 14:21:04 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Feb 06, 2007 at 12:03:03AM +1100, syan tan wrote:

> You are very right , after thinking about it. After login,
> my web app wouldn't be able to keep the connection object
> around, unless I knew the apache implementation was
> single threaded, or multithreaded with a non-threaded object
> area,
I didn't see things from this angle, but, yes.

> so I need to save the dsn, and recreate the connections
> for each query on the backend !
It depends. If you figure out a way to import gmPG2 *once*
per "http user session" you could rely on it to keep your
DSN around - as long as you do gmPG2.set_default_login()
somewhere along the way. If you then keep re-using that
imported-one gmPG2 you won't have to re-establish DSN.
However, one wouldn't want to re-use the DSN across several
HTTP-sessions (as in user-session, not as in
http-request-reply-session).

It might be an idea to assign http-users a cookie and import
gmPG2 once per http-user storing the module instances in a
dict keyed on that user-cookie.

Like a thin wrapper around gmPG2.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]