OPI Blog
Learn from experts in their fields

Browsing Tags: Grails

Aug 30, 2016
Monitoring Grails Applications The Easy Way
Grails allows you to create RESTful APIs or Web applications much more quickly than other JVM frameworks. You may be surprised to know, though, that Grails also provides a number of handy features to help ...
Using secondary datasources in Grails 3
Something changed in Grails 3 and how datasources are configured. If you have datasources defined like this: dataSources: dataSource: pooled: true jmxExport: true driverClassName: org.h2.Driver username: sa password: dbCreate: create-drop url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE secondary: pooled: true ...
Mar 1, 2016
Unit Testing URI-Based Grails Filters
This week while implementing a simplified version of Spring MVC in a Grails 2.x project, I ran into an interesting Grails bug (OK, more than one; it’s been a rough week).  Specifically, “GRAILS-8702: Unit Testing ...
Distributed Grails with Docker and Hazelcast
Normally a clustered application can be designed in a stateless manner which allows requests to be dispatched to any combination of nodes, but sometimes it is desirable to share data across the cluster. This post will ...
Dec 22, 2015
Configure Jenkins to dynamically create a database for your Grails tests
Test pollution can be a frustrating issue to look into, especially when the failures are sporadic. These may be caused by reliance on hard-coded fields (such as ids), timezone/DST issues, or previous test case leakage ...
Tweaking Column Types in Grails
We had been working on this Grails 2 app for a few weeks and we were finally ready to put it on a test server (instead of running it like run-app locally). More importantly we ...
Getting Grails Database Connections to Reconnect
Where I work, a bunch of the Grails have many, many datasources. One app in particular I was brought in on because it was dropping a bunch of connections on Saturday night or Sunday morning. ...
Aug 13, 2015
Sharing Grails HAL and JSON Renderers
Grails provides nice features for creating web services, customization is usually terse. According to the “Registering Custom Objects Marshallers” section of the Grails User Guide, custom object marshallers can registered using a simple closure. However, ...
5 Advantages of Test Driven Development
You may have heard of test driven development, but don’t know why it’s useful? After all, writing tests before production code sounds very odd. Come learn about five advantages of using TDD in your daily ...
WebSockets in Grails 3.0
For those who aren’t familiar, WebSockets are a long-lived, interactive, two-way channel between a client browser and end server that allows ongoing communication without polling. They’ve been around for a few years now ever since ...