X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 81AD89DC849 for ; Fri, 16 Dec 2005 06:17:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81548-04 for ; Fri, 16 Dec 2005 06:17:04 -0400 (AST) X-Greylist: delayed 00:06:40.734 by SQLgrey- Received: from web31805.mail.mud.yahoo.com (web31805.mail.mud.yahoo.com [68.142.207.68]) by postgresql.org (Postfix) with SMTP id 035779DCD3E for ; Fri, 16 Dec 2005 06:17:00 -0400 (AST) Received: (qmail 38861 invoked by uid 60001); 16 Dec 2005 10:10:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gYQ/J1OOjv8k55fhqPMQccIV9ItWANHgfGSx064cZo7PmhIhz903fv/kuDHNfcyQFS0NbhqrcP0G2ws0ZoKuUNPmMxjBogQmcnrv3eQQqfb4KDrq79Vq3/E7n61RzSYJOCbTpAzvhmydgDATZ1gVN+rfUb57XBadmWQSo80BAi8= ; Message-ID: <20051216101021.38859.qmail@web31805.mail.mud.yahoo.com> Received: from [59.144.43.117] by web31805.mail.mud.yahoo.com via HTTP; Fri, 16 Dec 2005 02:10:21 PST Date: Fri, 16 Dec 2005 02:10:21 -0800 (PST) From: Simon Moses Subject: setting & using connection pool in beans for tomcat. To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1868084810-1134727821=:38101" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=3.037 required=5 tests=[DEAR_SOMETHING=1.612, DNS_FROM_RFC_ABUSE=0.479, HTML_10_20=0.945, HTML_MESSAGE=0.001] X-Spam-Score: 3.037 X-Spam-Level: *** X-Archive-Number: 200512/72 X-Sequence-Number: 14403 --0-1868084810-1134727821=:38101 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 --0-1868084810-1134727821=:38101 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
 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 --0-1868084810-1134727821=:38101--