You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to groo...@googlegroups.com
What I'm thinking of is throwing off a thread when a particular GORM entity is created. The Quartz plug-in would be the equivalent of the solution I had to do in Rails (cron and ./script/runner) -- I was wondering if I could be a bit more direct in Groovy/Grails.
(Of course, I know I can parse XML in groovy/grails, so at least I'm up by one.)
~~ Robert.
Ted Naleid
unread,
May 12, 2008, 9:22:41 PM5/12/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to groo...@googlegroups.com
I haven't done this (quartz has satisfied the threading/scheduling needs for what we've done), but there shouldn't be any reason that you couldn't have a before/after interceptor that spins off a thread and does some processing. The only caveat would be that you'd need to size things appropriately depending on how many objects you're creating, how "bursty" the creation of that domain item is, and how expensive the thread that gets spun off is.
Robert Fischer
unread,
May 12, 2008, 9:31:43 PM5/12/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to groo...@googlegroups.com
Yeah, there's a whole scalability problem which I'm aware of.
I just wanted to be sure that there wasn't something weird with threads preventing requests from flushing or something.
~~ Robert.
podollb
unread,
May 14, 2008, 9:00:31 AM5/14/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Groovy Users of Minnesota
In the past I've used code like this, which seems to work fine...
class SomeController {
...
def somerequest = {
render "Your request has been submitted!"
def whoWantsToKnow = params.email
def mythread = new Thread({
String results = processSomethingFor(whoWantsToKnow)
emailerService.sendEmail(whoWantsToKnow, "requested
information", results)
});
mythread.start()
}
}