cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: Multiple DB Inserts for XSP?
Date Sat, 24 Jan 2004 14:04:45 GMT
Brent L Johnson wrote:

> I'm using the authentication framework to handle logins
> on the site I'm working on.  When the login is handled successfully the
> pipeline should do a map:generate for an XSP that does a database insert
> into a login_log table.
Sorry, I have no clues on your main question but I just had to pipe in 
on this strategy.  Most people would really recommend that you not use a 
generator to perform "actions".  That's what flow (and Actions) are for. 
  What happens when the insert fails for example?  You'll then want to 
be able to redirect from within a generator.  This kind of pattern is 
common in jsp, php, etc. but isn't necessary in Cocoon and similar 
frameworks designed to allow a separation of content from business logic.

> But - when I login.. I get TWO rows into the database,
> for one single insert.  I'm not sure how this is happening.. sometimes
> the timestamp between the inserts is 2-3 seconds.

The only thing I can suggest here is to add a healthy bit of logging to 
help track down where this is coming from.

Geoff


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


Mime
View raw message