From: Simon Moses <ks_moses@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: setting & using connection pool in beans for tomcat.
Date: Fri, 16 Dec 2005 02:10:21 -0800 (PST)
Message-ID: <20051216101021.38859.qmail@web31805.mail.mud.yahoo.com> (raw)
dear sir,
i have set connection pooling in tomcat. now i can use connections from that pool in jsp.
but i want all database accessing code in beans not in jsp. how to do it?
i want to write a class(CPCon.java) with methods like
{
void ConnectionPoolOpen(){}
Connection getConnection(){}
void closeConnection(){}
....
}
and call this class in all jsp pages with useBean tag.
if i write like this, is the connection pool is going to be used by all jsp pages for all tomcat server clients?
if not how to do this?
i am using tomcat 5.0. j2se1.4 and postgresql 8.0 with postgresql-8.0-312.jdbc3.jar driver.
regards,
Simon Moses.
**************************
Visit My Home Page
http://www.geocities.com/ks_moses
updated: 28 Sep 2004.
Simon Moses
**************************
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: ks_moses@yahoo.com
Subject: Re: setting & using connection pool in beans for tomcat.
In-Reply-To: <20051216101021.38859.qmail@web31805.mail.mud.yahoo.com>
References: <20051216101021.38859.qmail@web31805.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox