Re: Connection Pool
Hi, I remember reading something about Oracle having its own connection pooling. Pranav At 07:09 AM 11/30/2004, Campano, Troy wrote: If you use Apache Tomcat, you can use it's built-in connection pooling libraries (which is Jakarta Commons DBCP). Here's an example... http://www.tigersleep.com/ViewArticle.php?article=8 If you need more specific examples or help, let me know. Thanks! ~ Troy Campano ~ -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED] On Behalf Of Edward King Sent: Monday, November 29, 2004 8:31 PM To: [EMAIL PROTECTED] Subject: Connection Pool Hello every, I want to use Connection Pool which can connect into Oracle Database in JSP,I use one,but that connection pool often raise Http 500 errors,I am very puzzled with connection pool.Would you give me a advice where I can get a free Connection Pool which has good performance? Thanks in advance! === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com --- Pranav === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
Re: Connection Pool
In general it is good advice to Stay away from thin client JDBC implementations as their design has little to offer in the pooling arena specifically and JDBC design does not support threading generally Much better to Stay closer to Thick Client implementations which support DB specific pooling activities which are closely synchronised with the DB Server threads (refer to OCI spec from Oracle) for Implementation details please refer to OCI doc located at http://www.stanford.edu/dept/itss/docs/oracle/9i/java.920/a96654/oci_func.htm#1014118 Learn and use Transaction Management capabilities by calling DB du jour Procedures with appropriate input/output parameter(s) for Implementation details please refer to Oracle Procedures doc located at http://www-db.stanford.edu/~ullman/fcdb/oracle/or-plsql.html#procedures Good Luck/ Viel Gluck, Martin Gainty __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Laconia Data Systems (LDS) is proprietary to the company. It is confidential, legally privileged and protected by law. LDS does not own and endorse any other content. (mobile) Etats Unis / US 001-617-852-7822 From: Ananthalakshmi Subramaniyam <[EMAIL PROTECTED]> Reply-To: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Connection Pool Date: Tue, 30 Nov 2004 13:46:14 +0530 MIME-Version: 1.0 X-Originating-IP: [193.32.3.82] X-Originating-Email: [EMAIL PROTECTED] X-Sender: [EMAIL PROTECTED] Received: from mc4-f41.hotmail.com ([65.54.190.177]) by mc4-s7.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Tue, 30 Nov 2004 00:17:44 -0800 Received: from swjscmail2.java.sun.com ([192.18.99.108]) by mc4-f41.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Tue, 30 Nov 2004 00:17:43 -0800 Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by swjscmail2.java.sun.com (Postfix) with ESMTPid B8C56217BF; Tue, 30 Nov 2004 01:10:07 -0700 (MST) Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8e) with spool id 47559806 for [EMAIL PROTECTED]; Tue, 30 Nov 2004 01:04:55 -0700 Received: from hotmail.com (bay10-f18.bay10.hotmail.com [64.4.37.18]) by swjscmail1.java.sun.com (Postfix) with ESMTP id E6CE14D19 for <[EMAIL PROTECTED]>; Tue, 30 Nov 2004 01:04:54 -0700 (MST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 30 Nov 2004 00:17:02 -0800 Received: from 193.32.3.82 by by10fd.bay10.hotmail.msn.com with HTTP; Tue, 30 Nov 2004 08:16:14 GMT X-Message-Info: 29Fz9OI/FljKlX/3LrMpzABnz/r/XDFgyDImUlBy/Gs= X-Original-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-OriginalArrivalTime: 30 Nov 2004 08:17:02.0087 (UTC) FILETIME=[F843D970:01C4D6B4] Comments: To: [EMAIL PROTECTED] Precedence: list Return-Path: [EMAIL PROTECTED] Hi, You might have already know that SUN JDBC 2.0 optional package provides connection pooling feature. Please refer SUN JDBC documentation for more details. Since you are dealing with Oracle database, Oracle JDBC driver provides APIs to handle efficient batch execution,built-in connection pooling package, etc, which you can use in java/jsp code. Generally, it is not preferrable to handle database operations in a 3 tier architecture, where JSP is used only for presentation and all the JDBC related stuff should be handled in DAO(Data Access Objects). Please refer MVC architecture for more details. Oracle JDBC Developer's Guide: http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/toc.htm Please see Connection Pooling and Caching section. Oracle JDBC java documentation: http://download-east.oracle.com/otn_hosted_doc/jdeveloper/904preview/jdbc-javadoc/ Oracle JDBC Frequently Asked Questions: http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#36_00 Thanks, H.Ananthalakshmi. From: Edward King <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Connection Pool Date: Tue, 30 Nov 2004 13:46:23 +0800 Mr Ananthalakshmi Where can I get built-in package of Oracle JDBC driver? Would you give me some examples which call it in JSP? Thanks - Original Message - From: "Ananthalakshmi Subramaniyam" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 30, 2004 1:38 PM Subject: Re: Connection Pool > Hi, > > Are you using Oracle JDBC 2.0 Driver and Jdk 1.3 or greater? > Why can't you try the oracle connection pool, built-in package implemented > in Oracle JDBC driver. > Please go through Oracle JDBC Developer Guide for the implementation > details. > > Thanks, > H.Ananthalakshmi. > > >From: sandeepK <[EMAIL PROTECTED]> > >Reply-To: A mailing list about Java Server Pages specification and > >reference <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject:
Re: Connection Pool
Hi, You might have already know that SUN JDBC 2.0 optional package provides connection pooling feature. Please refer SUN JDBC documentation for more details. Since you are dealing with Oracle database, Oracle JDBC driver provides APIs to handle efficient batch execution,built-in connection pooling package, etc, which you can use in java/jsp code. Generally, it is not preferrable to handle database operations in a 3 tier architecture, where JSP is used only for presentation and all the JDBC related stuff should be handled in DAO(Data Access Objects). Please refer MVC architecture for more details. Oracle JDBC Developer's Guide: http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/toc.htm Please see Connection Pooling and Caching section. Oracle JDBC java documentation: http://download-east.oracle.com/otn_hosted_doc/jdeveloper/904preview/jdbc-javadoc/ Oracle JDBC Frequently Asked Questions: http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#36_00 Thanks, H.Ananthalakshmi. From: Edward King <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Connection Pool Date: Tue, 30 Nov 2004 13:46:23 +0800 Mr Ananthalakshmi Where can I get built-in package of Oracle JDBC driver? Would you give me some examples which call it in JSP? Thanks - Original Message - From: "Ananthalakshmi Subramaniyam" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 30, 2004 1:38 PM Subject: Re: Connection Pool > Hi, > > Are you using Oracle JDBC 2.0 Driver and Jdk 1.3 or greater? > Why can't you try the oracle connection pool, built-in package implemented > in Oracle JDBC driver. > Please go through Oracle JDBC Developer Guide for the implementation > details. > > Thanks, > H.Ananthalakshmi. > > >From: sandeepK <[EMAIL PROTECTED]> > >Reply-To: A mailing list about Java Server Pages specification and > >reference <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: Re: Connection Pool > >Date: Thu, 9 Dec 2004 08:33:54 -0800 > > > >yes i can give you the Connection Pool code I have developed for oracle > >database. > > > >Sandeep Katiyar > > > >- Original Message - > >From: "Edward King" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Monday, November 29, 2004 5:30 PM > >Subject: Connection Pool > > > > > > > Hello every, > > > I want to use Connection Pool which can connect into Oracle Database > >in > >JSP,I use one,but that connection pool often raise Http 500 errors,I am > >very > >puzzled with connection pool.Would you give me a advice where I can get a > >free Connection Pool which has good performance? > > > Thanks in advance! > > > > > > > >=== > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > >JSP-INTEREST". > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > >DIGEST". > > > > > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > > > > > http://java.sun.com/products/jsp > > > http://archives.java.sun.com/jsp-interest.html > > > http://forums.java.sun.com > > > http://www.jspinsider.com > > > > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > >JSP-INTEREST". > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > >DIGEST". > > > >Some relevant archives, FAQs and Forums on JSPs can be found at: > > > > http://java.sun.com/products/jsp > > http://archives.java.sun.com/jsp-interest.html > > http://forums.java.sun.com > > http://www.jspinsider.com > > _ > Chat with thousands of singles. > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Only on > BharatMatrimony.com's Instant Messenger. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com > > _ Life on the fast track! Get hooked to it! http://server1.msn.co.in/sp04/tataracing/ Meet the champs! === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
Re: Connection Pool
Hi, Why don't you use the JDBC 2.0 compliant connection pool open-source set up provided by Apache under Commons DBCP. It can connect to any database as long you have a DataSource for the database. You need to set up the pool in server.xml and refer that resource in the web.xml to make use of the pool. No change in the code is required if you get the datasource from JNDI in your code. Regards, Partha > -- > From: A mailing list about Java Server Pages specification and > reference[SMTP:[EMAIL PROTECTED] on behalf of Ananthalakshmi > Subramaniyam[SMTP:[EMAIL PROTECTED] > Sent: Tuesday, November 30, 2004 11:08 AM > To: [EMAIL PROTECTED] > Subject: Re: Connection Pool > > Hi, > > Are you using Oracle JDBC 2.0 Driver and Jdk 1.3 or greater? > Why can't you try the oracle connection pool, built-in package implemented > in Oracle JDBC driver. > Please go through Oracle JDBC Developer Guide for the implementation > details. > > Thanks, > H.Ananthalakshmi. > > >From: sandeepK <[EMAIL PROTECTED]> > >Reply-To: A mailing list about Java Server Pages specification and > >reference <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: Re: Connection Pool > >Date: Thu, 9 Dec 2004 08:33:54 -0800 > > > >yes i can give you the Connection Pool code I have developed for oracle > >database. > > > >Sandeep Katiyar > > > >- Original Message - > >From: "Edward King" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Monday, November 29, 2004 5:30 PM > >Subject: Connection Pool > > > > > > > Hello every, > > > I want to use Connection Pool which can connect into Oracle Database > >in > >JSP,I use one,but that connection pool often raise Http 500 errors,I am > >very > >puzzled with connection pool.Would you give me a advice where I can get a > >free Connection Pool which has good performance? > > > Thanks in advance! > > > > > > > >=== > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > >JSP-INTEREST". > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > >DIGEST". > > > > > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > > > > > http://java.sun.com/products/jsp > > > http://archives.java.sun.com/jsp-interest.html > > > http://forums.java.sun.com > > > http://www.jspinsider.com > > > > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > >JSP-INTEREST". > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > >DIGEST". > > > >Some relevant archives, FAQs and Forums on JSPs can be found at: > > > > http://java.sun.com/products/jsp > > http://archives.java.sun.com/jsp-interest.html > > http://forums.java.sun.com > > http://www.jspinsider.com > > _ > Chat with thousands of singles. > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Only on > BharatMatrimony.com's Instant Messenger. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
Re: Connection Pool
Hi, Are you using Oracle JDBC 2.0 Driver and Jdk 1.3 or greater? Why can't you try the oracle connection pool, built-in package implemented in Oracle JDBC driver. Please go through Oracle JDBC Developer Guide for the implementation details. Thanks, H.Ananthalakshmi. From: sandeepK <[EMAIL PROTECTED]> Reply-To: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Connection Pool Date: Thu, 9 Dec 2004 08:33:54 -0800 yes i can give you the Connection Pool code I have developed for oracle database. Sandeep Katiyar - Original Message - From: "Edward King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 29, 2004 5:30 PM Subject: Connection Pool > Hello every, > I want to use Connection Pool which can connect into Oracle Database in JSP,I use one,but that connection pool often raise Http 500 errors,I am very puzzled with connection pool.Would you give me a advice where I can get a free Connection Pool which has good performance? > Thanks in advance! > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com _ Chat with thousands of singles. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Only on BharatMatrimony.com's Instant Messenger. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
Re: Connection Pool
yes i can give you the Connection Pool code I have developed for oracle database. Sandeep Katiyar - Original Message - From: "Edward King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 29, 2004 5:30 PM Subject: Connection Pool > Hello every, > I want to use Connection Pool which can connect into Oracle Database in JSP,I use one,but that connection pool often raise Http 500 errors,I am very puzzled with connection pool.Would you give me a advice where I can get a free Connection Pool which has good performance? > Thanks in advance! > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
Re: Connection Pool
If you use Apache Tomcat, you can use it's built-in connection pooling libraries (which is Jakarta Commons DBCP). Here's an example... http://www.tigersleep.com/ViewArticle.php?article=8 If you need more specific examples or help, let me know. Thanks! ~ Troy Campano ~ -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED] On Behalf Of Edward King Sent: Monday, November 29, 2004 8:31 PM To: [EMAIL PROTECTED] Subject: Connection Pool Hello every, I want to use Connection Pool which can connect into Oracle Database in JSP,I use one,but that connection pool often raise Http 500 errors,I am very puzzled with connection pool.Would you give me a advice where I can get a free Connection Pool which has good performance? Thanks in advance! === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
Re: Connection pool
protomatter.sourceforge.net -Original Message- From: Deepak [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 2:28 PM To: [EMAIL PROTECTED] Subject: Connection pool Hi Can anyone tell me where I can get jdbc connection pool code or library? any urls will be helpful or if anybody has the code with them , kindly send it over. I am using Tomcat 3.3.1 and MySql 3.53 on a linux machine for my web app. Thanx in advance Deepak === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
Re: Connection Pool
The use of resources which are expensive to obtain, should be minimised. But sometimes it cannot be avoided all together. So the better strategy is to reuse the expensive resources as much as possible, once obtained. JDBC Connections are expensive resources and obtaining them is a time-consuming operation. So it is an optimization strategy to pool these Connections with some Resource Manager mediating the access to these Connections. You can get a more detailed explanation of Connection Pooling in any tutorial on JDBC 2.0. HTH, Reyas Aruniima Chakrabarti wrote: > Hi, > Can somebody please explain what is Connection Pooling??? > > Regards, > aruniima > > > > This message contains privileged and confidential information and is > intended only for the individual named. If you are not the intended > recepient you should not disseminate, distribute, store, print, copy or > deliver this message. Please notify the sender immediately by e-mail if you > have received this e-mail by mistake and immediately delete this e-mail from > your system. > > E-mail transmission cannot be guaranteed to be secure or error-free as > information could be intercepted, corrupted, lost, destroyed, arrive late or > incomplete, or contain viruses. The sender therefore does not accept > liability for any errors or omissions in the contents of this message which > arise as a result of e-mail transmission. If verification is required > please request a hard-copy version. > > -- > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Connection Pool
Hi Aruniima, You can find some useful information at : http://developer.java.sun.com/developer/technicalArticles/J2EE/pooling/ Hope that helps. Regards, Ritesh - Original Message - From: Aruniima Chakrabarti <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 2:59 PM Subject: Connection Pool Hi, Can somebody please explain what is Connection Pooling??? Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Connection Pool
the pool is a storage which can store N conncections when you want to connecte to the DB you first ask for Pool. if there is a spare connection in the pool .you can use it directly. othersize you.d connection to the DB which take time. you can write a simple connection pool. - Original Message - From: "Aruniima Chakrabarti" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 6:29 PM Subject: Connection Pool > Hi, > Can somebody please explain what is Connection Pooling??? > > Regards, > aruniima > > > -- -- > > This message contains privileged and confidential information and is > intended only for the individual named. If you are not the intended > recepient you should not disseminate, distribute, store, print, copy or > deliver this message. Please notify the sender immediately by e-mail if you > have received this e-mail by mistake and immediately delete this e-mail from > your system. > > > E-mail transmission cannot be guaranteed to be secure or error-free as > information could be intercepted, corrupted, lost, destroyed, arrive late or > incomplete, or contain viruses. The sender therefore does not accept > liability for any errors or omissions in the contents of this message which > arise as a result of e-mail transmission. If verification is required > please request a hard-copy version. > > > -- > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: connection pool
Hi, Weblogic Application server provides you connection pooling facility. You just have to set some properties in weblogic.properties file. as weblogic.jdbc.connectionPool.OraclePool=\ url=jdbc:oracle:thin:@192.168.168.100:1521:deep,\ driver=oracle.jdbc.driver.OracleDriver,\ initialCapacity=5,\ (no. of connections) maxCapacity=10,\ props=user=weblogic;password=weblogic,\ weblogic.allow.reserve.weblogic.jdbc.connectionPool.OraclePool=everyone weblogic.allow.reset.weblogic.jdbc.connectionPool.OraclePool=everyone weblogic.allow.shrink.weblogic.jdbc.connectionPool.OraclePool=everyone U can use any other type of JDBC drivers for connection pooling. But be sure that u specify the classpath of the driver properly as it may create problems. Connection pooling facility is also provided by few webservers such as Netscape Enterprise Server 3.6, but I am not very sure as I never used them. >From: Ehab Taleb <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: connection pool >Date: Tue, 30 Jan 2001 12:45:27 -0500 > >hi >do i have to implement connection pool manager in my application even if i >am using weblogic as my webserver >dose weblogic already has connection pool manager >can some body put some light on this subject and >which of the webservers out there give us this featue without implementing >it >thanks > >=== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST >DIGEST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
One possible approach could be to create a instance of your ConnectionPool class in a servlet and then place the instance in the servlet context. Then other jsp pages could acess the ConnectionPool Object using the implicit application object. Don't forget to have the servlet loaded by the webserver on startup. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Bhavesh Vakil <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 06, 2001 6:36 PM Subject: Connection Pool > Hi to all, > > I use Apache 1.3.12 + Tomcat 3.1 + Oracle 8.1.6 + Oracle 8.1.6 (JDBC 2.0) > driver on LINUX. I read Oracle 8.1.6 JDBC document and test all connection > pool + connection cache ] related programs in (.java) form. It works fine. > > My question is how I initialize [ connection pool / connection cache ] > instance in JSP. This initialize is only at once and then after all my JSP > pages related to application use this connection pool instance to generate > logical connections. > > Whether I prepare bean ? if yes then pl. explain complete hierarchy, how I > use this bean ? > > I read some thing about globals.jsa file. If any one know about globals.jsa > file then pl. explain, role of globals.jsa in JSP development and how to use > this file. > > > Regards, > Bhavesh. > > > __ > Do You Yahoo!? > Talk to your friends online with Yahoo! Messenger. > http://im.yahoo.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
you can access to the http://webdevelopersjournal.com/columns/connection_pool.html for detail information. --- Angela Chow <[EMAIL PROTECTED]> wrote: > Hi all, > We learned about the concept of using Connection > Pool > in JSP application. Can someone help to tell me > what > is the connection pool and how to implement it? > > Thanks > > Angela > > __ > Do You Yahoo!? > Yahoo! Mail - Free email you can access from > anywhere! > http://mail.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with > body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
We have got enough copies of ur question. If somebody knows he will respond back to u. Diwakar Killamsetty wrote: > Hi, > > I am novice to EJB Technologies. > Is there any way to create connection pool in Reference Implementation? If > so please let me know how to do. > Thanks in advance. > > regards, > Diwakar. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
Is it REALLY necessary to post simple questions multiple times across multiple lists? Especially when (i) it can be answered with a simple search. (ii) it has been answered in this forum before quite recently Go to www.excite.com, type in 'java connection pooling' and follow the first link (javaexchange.com) === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Fwd: Re: Connection Pool
That will depend on what bean scope you have given in the usebean tag ,if it is session it will last for the full session Sanjay >From: Rupali Bains Goswami <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Fwd: Re: Connection Pool >Date: Fri, 30 Jun 2000 07:08:14 PDT > >I already have the properties file setup the way u had specified, > >I have the login bean for the initial database connection, then i get the >username and password entered and compare it with the values specified in >my >customer table. After validation i need to go to the next jsp page. My >question is that will I have the connection to the database throughout the >session so that when i go to the different jsp pages and need to retrieve >data from the database, how do i do it? > >Thanks > > >>From: "Jaffa, Dan" <[EMAIL PROTECTED]> >>Reply-To: A mailing list about Java Server Pages specification and >> reference <[EMAIL PROTECTED]> >>To: [EMAIL PROTECTED] >>Subject: Re: Connection Pool >>Date: Fri, 30 Jun 2000 09:30:19 -0400 >> >>I am a little confused by your question but I will tell you what we have >>been doing >> >>In our EJB's and Beans we use the following code to connect to the >>database. >>Once we connect and retrieve all the necessary data we close the >>connection. >>I am using Weblogic Type II Oracle Driver. >> >>This code should be in your weblogic.properties file >> >>weblogic.jdbc.connectionPool.atlasPool=\ >> url=jdbc:weblogic:oracle,\ >> driver=weblogic.jdbc.oci.Driver,\ >> initialCapacity=1,\ >> maxCapacity=2,\ >> capacityIncrement=1,\ >> props=user=X;password=X;server=XX >> >>weblogic.allow.reserve.weblogic.jdbc.connectionPool.atlasPool=atlas >> >>the following code should be in your jsp, ejb or Beans or servelts >> >>Properties props = new Properties(); >>props.put("user",""); >>props.put("password","#"); >>Driver myDriver = >>(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance(); >>Connection conn = myDriver.connect("jdbc:weblogic:pool:atlasPool", props); >>sql = "Select * from dual >>QueryDataSet qds=new QueryDataSet(conn, sql); >>ResultSet rs = qds.getResultSet(); >> >> >> >> >>Daniel Jaffa >> >> >> >>-Original Message- >>From: Rupali Bains Goswami [mailto:[EMAIL PROTECTED]] >>Sent: Friday, June 30, 2000 8:54 AM >>To: [EMAIL PROTECTED] >>Subject: Connection Pool >> >> >>I Have a very basic question. >> >>I am using weblogic and have created the connection pool in the properties >>file. >> >>How do i then connect to the database? should i have an init method for >>the >>initial connection? >> >>All I want to do is initially connect to the database and query some >>tables >> >>the code is something like this >> >>Class.forName (jdbcClass).newInstance(); >>Connection conn = DriverManager.getConnection(jdbcURL,user,password); >> >>how would i then maintain the connection through all my jsp pages. >> >>Thanks for all the help. >> >>-Nisha >> >> >>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com >> >>=== >>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >>JSP-INTEREST". >>Some relevant FAQs on JSP/Servlets can be found at: >> >> http://java.sun.com/products/jsp/faq.html >> http://www.esperanto.org.nz/jsp/jspfaq.html >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets >> >>=== >>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >>JSP-INTEREST". >>Some relevant FAQs on JSP/Servlets can be found at: >> >> http://java.sun.com/products/jsp/faq.html >> http://www.esperanto.org.nz/jsp/jspfaq.html >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > >Get Your Private, Free E-mail from MSN
Re: Connection Pool
No you should close the connect to the pool after each page is done. I would not use the same connecting on different page. But the connect that weblogic has to the database does not close. Dan Jaffa -Original Message- From: Rupali Bains Goswami [mailto:[EMAIL PROTECTED]] Sent: Friday, June 30, 2000 10:08 AM To: [EMAIL PROTECTED] Subject: Fwd: Re: Connection Pool I already have the properties file setup the way u had specified, I have the login bean for the initial database connection, then i get the username and password entered and compare it with the values specified in my customer table. After validation i need to go to the next jsp page. My question is that will I have the connection to the database throughout the session so that when i go to the different jsp pages and need to retrieve data from the database, how do i do it? Thanks >From: "Jaffa, Dan" <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Connection Pool >Date: Fri, 30 Jun 2000 09:30:19 -0400 > >I am a little confused by your question but I will tell you what we have >been doing > >In our EJB's and Beans we use the following code to connect to the >database. >Once we connect and retrieve all the necessary data we close the >connection. >I am using Weblogic Type II Oracle Driver. > >This code should be in your weblogic.properties file > >weblogic.jdbc.connectionPool.atlasPool=\ > url=jdbc:weblogic:oracle,\ > driver=weblogic.jdbc.oci.Driver,\ > initialCapacity=1,\ > maxCapacity=2,\ > capacityIncrement=1,\ > props=user=X;password=X;server=XX > >weblogic.allow.reserve.weblogic.jdbc.connectionPool.atlasPool=atlas > >the following code should be in your jsp, ejb or Beans or servelts > >Properties props = new Properties(); >props.put("user",""); >props.put("password","#"); >Driver myDriver = >(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance(); >Connection conn = myDriver.connect("jdbc:weblogic:pool:atlasPool", props); >sql = "Select * from dual >QueryDataSet qds=new QueryDataSet(conn, sql); >ResultSet rs = qds.getResultSet(); > > > > >Daniel Jaffa > > > >-Original Message- >From: Rupali Bains Goswami [mailto:[EMAIL PROTECTED]] >Sent: Friday, June 30, 2000 8:54 AM >To: [EMAIL PROTECTED] >Subject: Connection Pool > > >I Have a very basic question. > >I am using weblogic and have created the connection pool in the properties >file. > >How do i then connect to the database? should i have an init method for the >initial connection? > >All I want to do is initially connect to the database and query some tables > >the code is something like this > >Class.forName (jdbcClass).newInstance(); >Connection conn = DriverManager.getConnection(jdbcURL,user,password); > >how would i then maintain the connection through all my jsp pages. > >Thanks for all the help. > >-Nisha > > >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > >=== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > >=== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
-Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Rupali Bains Goswami Sent: Friday, June 30, 2000 10:08 AM To: [EMAIL PROTECTED] Subject: Fwd: Re: Connection Pool I already have the properties file setup the way u had specified, I have the login bean for the initial database connection, then i get the username and password entered and compare it with the values specified in my customer table. After validation i need to go to the next jsp page. My question is that will I have the connection to the database throughout the session so that when i go to the different jsp pages and need to retrieve data from the database, how do i do it? Thanks >From: "Jaffa, Dan" <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Connection Pool >Date: Fri, 30 Jun 2000 09:30:19 -0400 > >I am a little confused by your question but I will tell you what we have >been doing > >In our EJB's and Beans we use the following code to connect to the >database. >Once we connect and retrieve all the necessary data we close the >connection. >I am using Weblogic Type II Oracle Driver. > >This code should be in your weblogic.properties file > >weblogic.jdbc.connectionPool.atlasPool=\ > url=jdbc:weblogic:oracle,\ > driver=weblogic.jdbc.oci.Driver,\ > initialCapacity=1,\ > maxCapacity=2,\ > capacityIncrement=1,\ > props=user=X;password=X;server=XX > >weblogic.allow.reserve.weblogic.jdbc.connectionPool.atlasPool=atlas > >the following code should be in your jsp, ejb or Beans or servelts > >Properties props = new Properties(); >props.put("user",""); >props.put("password","#"); >Driver myDriver = >(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance(); >Connection conn = myDriver.connect("jdbc:weblogic:pool:atlasPool", props); >sql = "Select * from dual >QueryDataSet qds=new QueryDataSet(conn, sql); >ResultSet rs = qds.getResultSet(); > > > > >Daniel Jaffa > > > >-Original Message- >From: Rupali Bains Goswami [mailto:[EMAIL PROTECTED]] >Sent: Friday, June 30, 2000 8:54 AM >To: [EMAIL PROTECTED] >Subject: Connection Pool > > >I Have a very basic question. > >I am using weblogic and have created the connection pool in the properties >file. > >How do i then connect to the database? should i have an init method for the >initial connection? > >All I want to do is initially connect to the database and query some tables > >the code is something like this > >Class.forName (jdbcClass).newInstance(); >Connection conn = DriverManager.getConnection(jdbcURL,user,password); > >how would i then maintain the connection through all my jsp pages. > >Thanks for all the help. > >-Nisha > > >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > >=== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > >=== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Fwd: Re: Connection Pool
I already have the properties file setup the way u had specified, I have the login bean for the initial database connection, then i get the username and password entered and compare it with the values specified in my customer table. After validation i need to go to the next jsp page. My question is that will I have the connection to the database throughout the session so that when i go to the different jsp pages and need to retrieve data from the database, how do i do it? Thanks >From: "Jaffa, Dan" <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Connection Pool >Date: Fri, 30 Jun 2000 09:30:19 -0400 > >I am a little confused by your question but I will tell you what we have >been doing > >In our EJB's and Beans we use the following code to connect to the >database. >Once we connect and retrieve all the necessary data we close the >connection. >I am using Weblogic Type II Oracle Driver. > >This code should be in your weblogic.properties file > >weblogic.jdbc.connectionPool.atlasPool=\ > url=jdbc:weblogic:oracle,\ > driver=weblogic.jdbc.oci.Driver,\ > initialCapacity=1,\ > maxCapacity=2,\ > capacityIncrement=1,\ > props=user=X;password=X;server=XX > >weblogic.allow.reserve.weblogic.jdbc.connectionPool.atlasPool=atlas > >the following code should be in your jsp, ejb or Beans or servelts > >Properties props = new Properties(); >props.put("user",""); >props.put("password","#"); >Driver myDriver = >(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance(); >Connection conn = myDriver.connect("jdbc:weblogic:pool:atlasPool", props); >sql = "Select * from dual >QueryDataSet qds=new QueryDataSet(conn, sql); >ResultSet rs = qds.getResultSet(); > > > > >Daniel Jaffa > > > >-Original Message- >From: Rupali Bains Goswami [mailto:[EMAIL PROTECTED]] >Sent: Friday, June 30, 2000 8:54 AM >To: [EMAIL PROTECTED] >Subject: Connection Pool > > >I Have a very basic question. > >I am using weblogic and have created the connection pool in the properties >file. > >How do i then connect to the database? should i have an init method for the >initial connection? > >All I want to do is initially connect to the database and query some tables > >the code is something like this > >Class.forName (jdbcClass).newInstance(); >Connection conn = DriverManager.getConnection(jdbcURL,user,password); > >how would i then maintain the connection through all my jsp pages. > >Thanks for all the help. > >-Nisha > > >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > >=== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > >=== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
There connection pools are setup via JNDI I think so you want to get the database and call getConnection on the datasource. > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of Rupali Bains Goswami > Sent: Friday, June 30, 2000 1:54 PM > To: [EMAIL PROTECTED] > Subject: Connection Pool > > > I Have a very basic question. > > I am using weblogic and have created the connection pool in the properties > file. > > How do i then connect to the database? should i have an init > method for the > initial connection? > > All I want to do is initially connect to the database and query > some tables > > the code is something like this > > Class.forName (jdbcClass).newInstance(); > Connection conn = DriverManager.getConnection(jdbcURL,user,password); > > how would i then maintain the connection through all my jsp pages. > > Thanks for all the help. > > -Nisha > > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > == > = > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
I am a little confused by your question but I will tell you what we have been doing In our EJB's and Beans we use the following code to connect to the database. Once we connect and retrieve all the necessary data we close the connection. I am using Weblogic Type II Oracle Driver. This code should be in your weblogic.properties file weblogic.jdbc.connectionPool.atlasPool=\ url=jdbc:weblogic:oracle,\ driver=weblogic.jdbc.oci.Driver,\ initialCapacity=1,\ maxCapacity=2,\ capacityIncrement=1,\ props=user=X;password=X;server=XX weblogic.allow.reserve.weblogic.jdbc.connectionPool.atlasPool=atlas the following code should be in your jsp, ejb or Beans or servelts Properties props = new Properties(); props.put("user",""); props.put("password","#"); Driver myDriver = (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance(); Connection conn = myDriver.connect("jdbc:weblogic:pool:atlasPool", props); sql = "Select * from dual QueryDataSet qds=new QueryDataSet(conn, sql); ResultSet rs = qds.getResultSet(); Daniel Jaffa -Original Message- From: Rupali Bains Goswami [mailto:[EMAIL PROTECTED]] Sent: Friday, June 30, 2000 8:54 AM To: [EMAIL PROTECTED] Subject: Connection Pool I Have a very basic question. I am using weblogic and have created the connection pool in the properties file. How do i then connect to the database? should i have an init method for the initial connection? All I want to do is initially connect to the database and query some tables the code is something like this Class.forName (jdbcClass).newInstance(); Connection conn = DriverManager.getConnection(jdbcURL,user,password); how would i then maintain the connection through all my jsp pages. Thanks for all the help. -Nisha Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: * Connection POOL *
Hola, Antonio. La verdad es que hoy no tengo muchas ganas de escribir en inglés, así que contesto a tu correo en la lengua del cid. Yo utilizo las connection poolsb que ofrece el servidor web caucho resin, a través de la clase DBPool, y funciona perfectamente. Si ya tienes otro servidor web y no quieres cambiarlo (por temas de seguridad, etc.) puedes instalar caucho servlet runner sobre él, lo único que no sé si así te funcionarán las DBPool... Si quieres descargártelo, www.caucho.com, y si tienes más dudas, contesta al foro, o [EMAIL PROTECTED] Consigue tu dirección de email gratis y permanente en http://WWW.LETTERA.NET Ýo unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name
Re: Connection Pool
Hi Sanjay, you can avoid the problem by using the double-checked locking pattern (Schmidt-Harris) as follows: public static ConnectionPoolAsSingelton getInstance() { // check for null singleton if(instance==null) { // obtain lock synchronized( this ) { // check for null again in case initialization // already occurred in another thread if(instance==null) { return new ConnectionPoolAsSingelton(); } } } else return instance; } the synchronization overhead is limited by the first null check, so that further calls to the method never reach the synchronization code and its associated overhead. Regards, Jin -Original Message- From: Radhakrishnan, Sanjay (c) [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 13, 2000 10:08 AM To: [EMAIL PROTECTED] Subject: Re: Connection Pool Hi Thomas, I have 2 questions, 1. the protected instance in the Singleton class should be static right? and Im sure thats what you meant. 2. Also shouldn't you make both the get and put methods thread safe. You've mentioned that only the Put method should be thread safe. Can i Synchronize on the static instance to make the methods threadsafe Thanks for your time Sanjay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 04, 2000 10:53 AM To: [EMAIL PROTECTED] Subject: SV: Connection Pool Hi Sanjay The best way is to implemets a Singelton (see the GoF book) that uses a ConnectionPool. public class ConnectionPoolAsSingelton { protected ConnectionPoolAsSingelton instance; // Store the Singelton here private ConnectionPoolAsSingelton(...) { // yes private constructor } public static ConnectionPoolAsSingelton getInstance() { if(instance==null) return new ConnectionPoolAsSingelton(); else return instance; } //Put methods for your connpool here but keep in mind that this code should bee thread safe. } to get an instance of connectionpool just call the static function ConnectionPoolAsSingelton pool = ConnectionPoolAsSingelton.getInstance(); This should work fine but if you have any problems pleas email me att [EMAIL PROTECTED] /Thomas -Ursprungligt meddelande- Fran: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Skickat:den 4 april 2000 15:57 Till: [EMAIL PROTECTED] Amne: Connection Pool I am trying to set up a connection pool for my JSP Project. Now I know that there are few ways to implement a connectionpool. My first thought was to put in the the servlets init method,But then what do i do for my other servlets/JSPs, do i create a connectionpool for every servlet?. Is there a standard technique for implementing connection pools. I think the best solution would be to have it in a common place which all the JSPs and servlets can access, something like a global.asa file in ASP. I would like to hear your thoughts on this. Thanks for your time Sanjay = == To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets <> === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
Hi Thomas, I have 2 questions, 1. the protected instance in the Singleton class should be static right? and Im sure thats what you meant. 2. Also shouldn't you make both the get and put methods thread safe. You've mentioned that only the Put method should be thread safe. Can i Synchronize on the static instance to make the methods threadsafe Thanks for your time Sanjay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 04, 2000 10:53 AM To: [EMAIL PROTECTED] Subject: SV: Connection Pool Hi Sanjay The best way is to implemets a Singelton (see the GoF book) that uses a ConnectionPool. public class ConnectionPoolAsSingelton { protected ConnectionPoolAsSingelton instance; // Store the Singelton here private ConnectionPoolAsSingelton(...) { // yes private constructor } public static ConnectionPoolAsSingelton getInstance() { if(instance==null) return new ConnectionPoolAsSingelton(); else return instance; } //Put methods for your connpool here but keep in mind that this code should bee thread safe. } to get an instance of connectionpool just call the static function ConnectionPoolAsSingelton pool = ConnectionPoolAsSingelton.getInstance(); This should work fine but if you have any problems pleas email me att [EMAIL PROTECTED] /Thomas -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Skickat:den 4 april 2000 15:57 Till: [EMAIL PROTECTED] Ämne: Connection Pool I am trying to set up a connection pool for my JSP Project. Now I know that there are few ways to implement a connectionpool. My first thought was to put in the the servlets init method,But then what do i do for my other servlets/JSPs, do i create a connectionpool for every servlet?. Is there a standard technique for implementing connection pools. I think the best solution would be to have it in a common place which all the JSPs and servlets can access, something like a global.asa file in ASP. I would like to hear your thoughts on this. Thanks for your time Sanjay = == To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets <> === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
"Radhakrishnan, Sanjay (c)" wrote: > I am trying to set up a connection pool for my JSP Project. Now I know that > there are few ways to implement a connectionpool. My first thought was to > put in the the servlets init method,But then what do i do for my other > servlets/JSPs, do i create a connectionpool for every servlet?. > > Is there a standard technique for implementing connection pools. I think > the best solution would be to have it in a common place which all the JSPs > and servlets can access, something like a global.asa file in ASP. > The most useful place I've found to put a connection pool is as a servlet context attribute. Now, it is accessible from a servlet: ConnectionPool pool = getServletContext().getAttribute("pool"); or from a JSP page: as long as the servlets and JSP pages belong to the same web application. > > I would like to hear your thoughts on this. > > Thanks for your time > Sanjay > Craig McClanahan === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
I am trying to figure out how to submit to a method within a bean from a jsp form page. I am using Tomcat 3.1beta for my engine. Any help would be appreciated. Matt Atwater Celestial Seasonings === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Connection Pool
In our forthcoming "Java XML programming with Servlets and JSP" (WROX, within a month) we've implemented connection pooling, using a Singleton class that extends a more general Cache class. Connection pools can be dynamically created and accessed by their defining characteristics, i.e., dbUrl, username and password. > -Original Message- > From: D. J. Hagberg [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 03, 1999 5:13 PM > Subject: Re: Connection Pool > > > Cory L Hubert wrote: > > > > Ok. I am on a roll now. I am trying to setup a > Connection Pool. I have > > a few samples. But I don't know where to put it in my > project. Should I > > put it in the Beans? Or should I just make one > connectionpool jsp file and > > include it in all the pages? > > > > What is the best way? I know this is an opened end > question but, I'd like > > to hear a few suggestions. > > We have also written a simple singleton ConnectionGenerator class that > has static poolCheckout(...) and poolCheckin(Connection) > methods. These > methods are used > inside our *bean* code whenever a db connection in needed. > This is done > because > you want to be sure to check the Connection back into a pool > regardless > of whether > an exception occurred in your code or not, so you need a try/finally > combo. > We also use this combo to implement transaction rollback when > multi-statement > transactions are used. > > For example: > > boolean autoCommit = false; > boolean committed = false; > Connection c = ConnectionGenerator.poolCheckout(); > Statement s = null; > try { > // do some stuff that could possibly throw an exception. > s = c.createStatement(); > s.executeUpdate("UPDATE x SET q=5"); > s.commit(); > s.close(); > committed = true; > s = null; > } > finally { > if( s != null ) try {s.close();} catch(SQLException > ignore1) { } > if(!committed ) try {c.rollback();} > catch(SQLException ignore2) > { } > ConnectionGenerator.poolCheckin(c); > } > > I really don't think you'd want to implement this sort of code in a > .jsp... > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Connection Pool
Cory L Hubert wrote: > > Ok. I am on a roll now. I am trying to setup a Connection Pool. I have > a few samples. But I don't know where to put it in my project. Should I > put it in the Beans? Or should I just make one connectionpool jsp file and > include it in all the pages? > > What is the best way? I know this is an opened end question but, I'd like > to hear a few suggestions. We have also written a simple singleton ConnectionGenerator class that has static poolCheckout(...) and poolCheckin(Connection) methods. These methods are used inside our *bean* code whenever a db connection in needed. This is done because you want to be sure to check the Connection back into a pool regardless of whether an exception occurred in your code or not, so you need a try/finally combo. We also use this combo to implement transaction rollback when multi-statement transactions are used. For example: boolean autoCommit = false; boolean committed = false; Connection c = ConnectionGenerator.poolCheckout(); Statement s = null; try { // do some stuff that could possibly throw an exception. s = c.createStatement(); s.executeUpdate("UPDATE x SET q=5"); s.commit(); s.close(); committed = true; s = null; } finally { if( s != null ) try {s.close();} catch(SQLException ignore1) { } if(!committed ) try {c.rollback();} catch(SQLException ignore2) { } ConnectionGenerator.poolCheckin(c); } I really don't think you'd want to implement this sort of code in a .jsp... === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Connection Pool
I use a Singelton class ConnectionHandler to manage my connection pools. This ConnectionHandler has static methods to get and close a connection. When you get a connection you really get a wrapper for a connection (but it implements sql.connection itself as well.) the close method of the wrapper doesn't close the underlying connection but releases it in the pool. Geert 'Darling' Van Damme > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of Cory L Hubert > Sent: vrijdag 3 december 1999 16:55 > To: [EMAIL PROTECTED] > Subject: Connection Pool > > > Ok. I am on a roll now. I am trying to setup a > Connection Pool. I have > a few samples. But I don't know where to put it in my project. Should I > put it in the Beans? Or should I just make one connectionpool > jsp file and > include it in all the pages? > > What is the best way? I know this is an opened end > question but, I'd like > to hear a few suggestions. > > == > = > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html