File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Groovy and the fly likes using GPars with Grails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "using GPars with Grails" Watch "using GPars with Grails" New topic

using GPars with Grails

Maharaj thak

Joined: Jul 29, 2010
Posts: 27
Hi All,
I have started playing with GPars.Now I have a class

class Job{

String language


I want to show how many jobs are advertised for each language.I have done something like this in the Controller

GParsPool.withPool {

final List result=["Java","Groovy","Scala"].collectParallel{Job.countByLanguageIlike("%{it}%")}
println result

The result I am getting is [0,0]

Anybody got any ideas as to where am I going wrong.

Mauji Thak
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Should {it} be ${it} ??

GenRocket - Experts at Building Test Data
Maharaj thak

Joined: Jul 29, 2010
Posts: 27
Thanks Gregg that worked.

mauji thak
I agree. Here's the link:
subject: using GPars with Grails
It's not a secret anymore!