Two Laptop Bag*
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
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: using GPars with Grails
 
Similar Threads
Action code reuse
More question ...
Always getting error- no result defined for action and result success
Struts action ognl setters and getters
images in labels?