cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Painter-Wakefield <paint...@mc.duke.edu>
Subject Re: Dynamic connection to the database
Date Wed, 05 May 2004 14:20:09 GMT




What are you using:  ESQL, SQLTransformer, ...?

For ESQL at least, and I imagine for SQL Transformer, you don't have to use
a pool connection.  You can dynamically provide the jdbc connection
parameters.  The downside is that you make a new connection on every
request (unlike a traditional client-server application where your login
session is maintained from page to page).  Also, you have to maintain db
accounts for everyone who needs to log in.

We had a similar need in our application.  I did an extension to ESQL that
uses a java SQL parser to take apart each query, and rewrite it to add in
the auditing information (after looking to see if the tables in question
have the auditing fields), using the web app login name instead of a
separate Oracle account.  That way we can continue to use the pool
connection.  This was the hard way, but it does the job.

-Christopher



|---------+------------------------------->
|         |           Yves Vindevogel     |
|         |           <yves.vindevogel@imp|
|         |           lements.be>         |
|         |                               |
|         |           05/05/2004 05:37 AM |
|         |           Please respond to   |
|         |           users               |
|         |                               |
|---------+------------------------------->
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                       |
  |       To:       users@cocoon.apache.org                                              
                       |
  |       cc:                                                                            
                       |
  |       Subject:  Dynamic connection to the database                                   
                       |
  >--------------------------------------------------------------------------------------------------------------|




Hi,

I need to keep track of who changes records in my database (I use
postgres).
I would like to make a connection to my database BUT always with a
different username / password.

In my config file, this is a fixed thing.

Is there a way to do this ?


Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message