page banner
'Painless Groovy Concurrency' post illustration
Painless Groovy Concurrency

Gpars (Groovy Parallel Systems) is the best solution for your concurrency problems with mutable objects. Gpars gives you a number of high-level abstractions for writing concurrent and parallel code in Groovy (map/reduce, fork/join, asynchronous closures, actors, agents, dataflow concurrency and other concepts), which can make your Java and Groovy code concurrent and/or parallel with little effort. Gpars is bundled in Groovy starting from version of 2.1.

'Dump a specific table or few rows (MySQL)' post illustration
Dump a specific table or few rows (MySQL)

The 'mysqldump' command is used to dump databases managed by MySQL. Let's consider three the most useful cases of MySQL database dumping.

'How to deploy Grails (Tomcat 7) application to Cloud Foundry' post illustration
How to deploy Grails (Tomcat 7) application to Cloud Foundry

I had an issue with deploying my Grails project to Cloud Foundry with using cloudfoundry-grails-plugin. My application was using Tomcat 7 unlike Cloud Foundry, which use Tomcat 6. In other words, to have a Grails application with Tomcat 7 run, I had to deploy the entire Tomcat 7 directory, but before it should be slightly reconfigured.

'Checkout a specific revision with Git' post illustration
Checkout a specific revision with Git

If you have a project and want to checkout specific revision (commit), you can do it as described below.

'Upgrade ElasticSearch on Linux' post illustration
Upgrade ElasticSearch on Linux

Suppose you have a system with ElasticSearch server installed and need to upgrade it to a newer version. Below is a step-by-step guide explaining how you can do it, but note that it only works for ElasticSearch pre-1.x versions. It's also assumed that you have already stopped your ElasticSearch cluster before upgrading.

'Get total records count with GORM criteria' post illustration
Get total records count with GORM criteria

Assume you have a page with pagination that displays some objects table (selected from DB with GORM criteria) in your Grails application. If you want to know total number of possible results (as if there are no pagination parameters), you can do it in this way:

'Native 0mq library version for akka-zeromq-2.0.x' post illustration
Native 0mq library version for akka-zeromq-2.0.x

I had a chance to try akka-zeromq module last month in order to implement solution for inter-service communication using Scala, Akka 2.0 and ZeroMQ.

'Changing the Grails project configuration from within a plugin' post illustration
Changing the Grails project configuration from within a plugin

This code snippet shows how to update project configuration settings from a Grails plugin executable script. The script changes the configuration by copying the settings from a default config file, placed in the plugin's folder, to the Config.groovy. This is usually very useful during a plugin installation when you need to provide some default configuration:

'Unit testing web flow in Grails' post illustration
Unit testing web flow in Grails

I've faced a problem with unit testing web flow controllers

There's an existings WebFlowUnitTestMixin for unit testing webflow in GDK, but no word on how to use it in the latest Grails 2.2.0 official documentation.