Just stick with that example I gave you. OR use PoolMan. It's great 
manager!
By initializing DB connections on init(), do the job.


>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/5/01, 1:42:21 PM, "Steve Ruby" <[EMAIL PROTECTED]> wrote 
regarding Re: Speeding up database accesses:


> For one reason you are going to have a connection dedicated
> to that session even if it isn't using it, so you will
> have one connection per session when you really only need
> one connection per use which is likely to be MUCH smaller, especially
> considering the session doesn't die until session-timeout so you
> will have a buch of lame connection sitting around takeing up
> memory waiting to die..

> A pool (especially a good one) will allow you to have
> only the number of connections you need available to you
> at any time.



> CPC Livelink Admin wrote:
> >
> > Why is it a bad idea to use a session variable?
> >
> > -----Original Message-----
> > From: Randy Layman [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 05, 2001 3:52 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Speeding up database accesses
> >
> >         One possibility (altough a bad idea) is to stick it into your
> > session.
> >
> >         Another possibility is to create an object that has a static
> > variable for the Connection.  Then provide methods to access it.  
Remember
> > that you need to make sure only one thing at a time is using the 
connection.
> >
> >         There are some pooling connection managers out there already.  
One
> > that I know of off the top of my head is PoolMan.  You can go over to
> > sourceforge.net and search for it.
> >
> >         Randy
> >
> > -----Original Message-----
> > From: John Coonrod [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 05, 2001 4:19 PM
> > To: [EMAIL PROTECTED]
> > Subject: Speeding up database accesses

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

NOTICE:  This communication may contain confidential or other privileged information.  
If you are not the intended recipient, or believe that you have received this 
communication in error, please do not print, copy, retransmit, disseminate, or 
otherwise use the information.  Also, please indicate to the sender that you have 
received this email in error, and delete the copy you received.  Any communication 
that does not relate to official Columbia business is that of the sender and is 
neither given nor endorsed by Columbia.  Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to