Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 79840 invoked from network); 3 Apr 2006 16:27:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Apr 2006 16:27:03 -0000 Received: (qmail 82147 invoked by uid 500); 3 Apr 2006 16:26:27 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 82021 invoked by uid 500); 3 Apr 2006 16:26:26 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 81825 invoked by uid 99); 3 Apr 2006 16:26:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Apr 2006 09:26:25 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [65.82.80.2] (HELO CSC1MAILVS1.sefl.net) (65.82.80.2) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Apr 2006 09:26:25 -0700 Received: from csc1mail002.sefl.net(10.251.1.61) by CSC1UTIL003.SEFL.NET via smtp id 3284_16e061ce_c2fd_11da_9c29_001143d33272; Mon, 03 Apr 2006 06:32:03 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message Subject: RE: Can any body send me a sample war file to demonstrate Connection pool in tomcat 5.5 Date: Mon, 3 Apr 2006 12:25:56 -0400 Message-ID: <1448E9AFF6AD6842BF1907D65A5386A704E6A1E4@CSC1MAILVS1.sefl.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Can any body send me a sample war file to demonstrate Connection pool in tomcat 5.5 Thread-Index: AcZXOR3HByx8KIxKRI6INsblujIFzQAAZXnA From: "Farrow, Marc" To: "Tomcat Users List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N You need to add a new Data Source either globally or within your context. Give it a name say "jdbc/connectionname". Check Tomcat documentation on how to do this. Then in your java code write this to get your Data Source reference and connection via this code: Context ctx = new InitialContext(); Context envCtx = (Context)ctx.lookup("java:comp/env"); // notice that the parameter to the envCtx.lookup method below matches the string defined above. DataSource ds = (DataSource)envCtx.lookup("jdbc/connectionname"); if (ds != null) { conn = ds.getConnection(); } -----Original Message----- From: rao krishna [mailto:k_krishna_rao@yahoo.com] Sent: Monday, April 03, 2006 12:10 PM To: users@tomcat.apache.org Subject: Can any body send me a sample war file to demonstrate Connection pool in tomcat 5.5 Can any body send me a sample war file which demonstrate Connection pool in tomcat 5.5 using jndi look up procedure. I tried a lot But I could n't. Any alternate in apache tomcat5.5 also ok. Please help me as soon as possible. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org