File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Groovy and the fly likes using GPars with Grails Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other Languages » Groovy
Reply 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: 21
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
Sheriff

Joined: Jul 11, 2001
Posts: 15040

Should {it} be ${it} ??


My Blog | DZone Articles
Maharaj thak
Greenhorn

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

Regards
mauji thak
 
 
subject: using GPars with Grails
 
Threads others viewed
More question ...
Struts action ognl setters and getters
Action code reuse
images in labels?
Always getting error- no result defined for action and result success
IntelliJ Java IDE