Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 83782 invoked from network); 28 Nov 2007 08:51:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2007 08:51:19 -0000 Received: (qmail 67624 invoked by uid 500); 28 Nov 2007 08:51:06 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 67253 invoked by uid 500); 28 Nov 2007 08:51:05 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 12409 invoked by uid 99); 28 Nov 2007 02:27:30 -0000 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.es; h=Received:X-YMail-OSG:Subject:From:To:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=vmTYAtFNrd1nD5AvHH7dMPXybOqX80ZRsAUpSfWHXYIHFmNOpq3bIB1RWAaV1J7jkLEEO2GVDgwwoYGZHBcYSfIaPLXLcZ1PvMvoXAzt/Nou35hOCSW23UxZ5W9CxGFo0psykHyIZFrJB+X6cyHobllWhPNf8fpJoGn8UkYispc= ; X-YMail-OSG: 3c1vrpkVM1lMW.SpdqlawQf1EKFP8tNB3hvoESET_ugkX26z49yWBOuGxi3cxWbYkZSQJU4VTA-- Subject: Storing session/connection data. From: Antonio David =?ISO-8859-1?Q?S=E1nchez?= Nadal To: derby-user@db.apache.org Content-Type: text/plain Date: Tue, 27 Nov 2007 20:27:08 -0600 Message-Id: <1196216828.23491.22.camel@antonio-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello. Is there any way I can store data for a connection session? I am talking about the equivalent of session data in a web application, for instance. This my requirement: I am developing a client/server Java application using derby, any Java client will have its own connection to the database (no multi-tier). The application manages its own table of users and connects to the database with a different, specific derby database user. I also need to audit the database on the basis of the application user by means of triggers. But I don't know how to make derby remember the application user for the current session/connection, CURRENT_USER function retrieves the derby dabase user tha was used to connect the database (the same for all application connections). I would also prefer to avoid a database request from client in order to carry out the audit operation, i.e., not using triggers. If it is not possible to do this, is it a standard practice in an application like this to map application users to database users? I prefer avoiding this for aplication security and maintainability reasons. Hopefully someone can help me with this. Thanks for your time and kind regards. Antonio. ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y m�viles desde 1 c�ntimo por minuto. http://es.voice.yahoo.com