Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 9526 invoked by uid 500); 27 Sep 2002 12:35:51 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 9501 invoked from network); 27 Sep 2002 12:35:51 -0000 Message-ID: <3D945047.9040200@verizon.net> Date: Fri, 27 Sep 2002 08:34:15 -0400 From: Vadim Gritsenko User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: Re: How to create db conn in action to use in esql or sql? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Timothy Larson wrote: >Each session needs to be logged into the database with a >different username and password. > Do you think it's a good idea? >How can I do this using a database pool? > There is no way unless you know SQL command to do it. The hole purpose of a pool is to "connect once", and avoid a lot of costly connects in a run. Vadim >Tim > > > >>>>>vadim.gritsenko@verizon.net 09/26/02 04:33PM >>> >>>>> >>>>> >>Timothy Larson wrote: >> >> >> >>>I need to create a database connection, >>> >>> >>Why not: >>1. Get connection from the pool, >>2. >> >> >>>do some security checks, >>> >>> >>3. >> >> >>>set a user role >>> >>> >>And then, >> >> >>>run queries against the database. >>> >>> >>Using ESQL+XSP or SQL transformer. >>PS It's really bad idea to create connection per request. >> >>Vadim >> >> >> >>>I made an action to do all of the setup, but I do not know how >>>to make xsp/esql or xsl/sql use the established connection. >>> >>>Any ideas how to make esql or sql use a previously created >>>database connection? Unless there is a trick, I do not think >>>I can use connection pools for this, because the security >>>checks and role setting has to be done per user. >>> >>>If I find a solution, I will share it with the list. >>> >>>Tim >>> >>> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: