Hello struts,

Thursday, August 19, 2004, 7:13:33 AM, you wrote:


sD> Hi, 

sD> I am going to write an app that allow user to register in a JSP page,
sD> press submit, then user redirected to a new page telling user
sD> to check email, click on a link on email, redirected to a page,
sD> then commit user  info to database. If user doesn't do this
sD> within 24 hrs, then delete user info.

sD> I have no problem sending email with a unique link made up
sD> of unique username plus some random generated digits and characters.

sD> I was wandering if anyone has done this and give me some tips.

sD> The way I see it is commit user's registration detail to database 1st
sD> when user click submit, then send email (using jarkata mailer tag).

sD> Then delete user record if user don't click/visit link on dynamically
sD> generated link within 24 hr from email. The link would have parameter
sD> that can tell an Action who is visiting.

sD> Problem:
sD> Now, how do I write an Action that will check back latter after 24 Hrs
sD> for an user?? Using thread in Action??? Dunno if that's a good idea.

sD> The way I am going to do this is, have an Action implement
sD> thread, for evey user registration, set wake up (check back)
sD> interval after 24 hr. Every user visiting this Action will wake
sD> up Action and do validation. After that, Action goes back to sleep.

sD> Is this a good idea??

What about following variant?

In "execute" method of RegistrationAction:
1. Drop ALL expired records from database
2. Commit user info to DB







sD> ---------------------------------------------------------------------
sD> To unsubscribe, e-mail: [EMAIL PROTECTED]
sD> For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Best regards,
 Pavlikus                            mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to