cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Vindevogel <>
Subject Re: Dynamic connection to the database
Date Wed, 05 May 2004 10:05:26 GMT
Not really mixing things ....

This is the scenario:
1) user logs in (cocoon authentication used)
2) user enters data in a form (or updates data in a form) and submits
3) data is stored in database table with this structure (example)

LastName  varchar(50)
FirstName  varchar(50)
Actor            varchar(50)
TS (Timestamp)	datetime

The field Actor contains the login used to insert, update or 
(logically) delete the record.

I want to prevent that I need to add the "login" as a parameter to each 
function (stored procedure).
If I create my connection, the database can tell the login that is 
used.  And it can fill out the timestamp for me.
I do not need to pass those.

Unfortunately, my connection in Cocoon is always defined with a fixed 
So even when I login with Cocoon Authentication, my database only knows 
one login: the one I specify in my conf. file.

On 05 May 2004, at 11:42, Derek Hohls wrote:

> Yves
> Are you not mixing two operations here; its the Cocoon
> application that is making the DB connection - the people
> who are using the that connection can be tracked and
> logged separately (using various of the Cocoon authentication
> methods.....).  One could, of course, set up different *types*
> of connections in the config file, based on, say, read-only
> access vs update-type access, but this is still different from
> tracking the users.
> This separation also makes your application more flexible
> and easier to maintain.
> Derek
>>>> 2004/05/05 11:37:01 AM >>>
> 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
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message