First of all, there are several connection pools avaiable, so you
might want to look at those before you decide that re-inventing the wheel is
a good thing.

        Second, most connection pools work by using static classes.  Your
code would look something like:

        Connection conn = ConnectionPool.getConnection();

and the ConnectionPool would look something like:

        public static Connection getConnection()


        Randy


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 5:17 AM
To: [EMAIL PROTECTED]
Subject: Database connection pool scope


Hello everybody,

I am pretty new to Tomcat, but previously developed applications for other
Java application servers (mostly Bea Weblogic). We want to set up a
database connection pool to enhance performance, but we are making database
connections using our class libraries; not directly from servlets / JSPs...
To use a pool inside a JSP I would simply create an application object or a
JavaBean and use it. But inside a class; I cannot use Tomcat's application
scope. In Weblogic, there is a special "workspace" class, which
instantiates with the server startup and is available to other classes in
the application (this is very similar to the application object in JSPs -
but you can use it everywhere). Is there a counterpart in Tomcat? If not,
how can I implement a connection pool which is available to the business
classes that I wrote.

Thanks in advance.
Selcuk Ayguney


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

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

Reply via email to