Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 2551 invoked from network); 3 Sep 2000 13:41:29 -0000 Received: from kakapo.susa.net (212.88.54.250) by locus.apache.org with SMTP; 3 Sep 2000 13:41:29 -0000 Received: from kevin (helo=localhost) by kakapo.susa.net with local-esmtp (Exim 3.03 #1) id 13VZxN-0006il-00 for tomcat-user@jakarta.apache.org; Sun, 03 Sep 2000 14:37:09 +0100 Date: Sun, 3 Sep 2000 14:37:09 +0100 (BST) From: Kevin Sangalee To: tomcat-user@jakarta.apache.org Subject: Re: bean scope In-Reply-To: <39B20605.51E145D@intland.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Sun, 3 Sep 2000, Zsolt Koppany wrote: The short answer is don't tie the database connection into the session, but instead hold some kind of user id. Then using a connection pool, obtain a database connection, so some db stuff, and release the connection to the pool. This way, your bean can stay in the "request" scope, meaning that it's instantiated at the beginning of each page request, and lives only until that request has been satisfied. > My application has a top page where a user must login into a database. > After the user logged in, it would be for me nice if I my application > could you the JDBC connection everywhere (I mean all pages the user > visit after he logged in), but I need a separated (not shared) > connection for every user. Do I need "scope=session"?