aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "using GPars with Grails" Watch "using GPars with Grails" New topic
Author

using GPars with Grails

Maharaj thak
Greenhorn

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.

Regards
Mauji Thak
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Should {it} be ${it} ??


GenRocket - Experts at Building Test Data
Maharaj thak
Greenhorn

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

Regards
mauji thak
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: using GPars with Grails