Here's how I'd do it...and it has nothing to do with GWT.  You server
side impl class is just a java servlet with a bunch of methods
(assuming here...).  At the beginning of each method, add a call to
another method, call it checkAndDeleteImages()..  Inside that guy, go
to your database with today's date and query all images that have a
creation date (or something similar) of today - 2 months.  Get those
images (blobs?, strings?, what?) and fire up good old javamail
(javax.mail.Message in particular), create a message (probably
MimeMultipart if I remember correctly for the attachment), point it at
a valid SMTP server and send.  When complete, delete the images.

Add this method call to every server side method call....sometimes
you'll check seconds after checking...if that's oppressive, create a
stateful bean on your app server with the timer.

Don't try to do this in your client code...you'll go nuts and cause
yourself a bunch of head aches, in my opinion.

Later,

Shaffer

On Aug 9, 2:53 pm, GKotta <guruko...@gmail.com> wrote:
> Hi,
>
> I need to find a way to delete some images in the database after two
> months. I thought of using the timer class, but I think it only lasts
> one session. Does anyone know how I could do this?
>
> Also, I need to email those images out before I delete them. How would
> I send those images as an attachment?
>
> Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to