[imp] DB Connection Handle Consumption

Chuck Hagenbuch chuck@horde.org
Mon, 22 Apr 2002 23:54:45 -0400


Quoting "Sexton, George" <gsexton@mhsoftware.com>:

> Create a class called ImapConnectionPool that would have a method
> getConnection(SessionID, Server,User ID, Password) that returns an IMAP
> Connection object.

This all works for servlets. The PHP architecture is different. Like I 
said, there's a _lot_ on this in the archives; the short summary is that 
you end up having at least 1 connection per apache child per user - and 
that's not workable.

> An alternate approach would be to save the Connection object on the
> session, and have the destructor disconnect. This would be cleaner, but 
> probably would not scale as well as the other, more complicated approach 
> since sessions can be arbitrarily long.

Also, you can't toss open sockets (for example) into a PHP session.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"A dream which helps you to live your reality with dignity
 and justice is a good dream." - Tariq Ramadan