Last updated by lhotari 2 years ago

2.4.3 Release Notes

Grails is a dynamic web application framework built on Java and Groovy, leveraging best of breed APIs including Spring, Hibernate and SiteMesh. Grails brings to Java and Groovy developers the joys of convention-based rapid development while allowing them to leverage their existing knowledge and capitalize on the proven and performant APIs Java developers have been using for years.

Update Notes

Recommended plugin versions

If you are upgrading from Grails 2.4.2 and you use the hibernate4 plugin, you will need to update the version in BuildConfig:

runtime ':hibernate4:' // or ':hibernate:'

IMPORTANT! Add "flush.mode = 'manual'" setting to hibernate config block in DataSource.groovy file when upgrading. Read the following upgrade notes about this change in auto flushing behaviour.

recommended tomcat, asset-pipeline, cache and scaffolding plugin versions for Grails 2.4.x :

build ':tomcat:7.0.54'
compile ':cache:1.1.7'
compile ':scaffolding:2.1.2'
compile ':asset-pipeline:1.9.6'

If you are using MongoDb GORM, the recommended plugin version is 3.0.2

compile ':mongodb:3.0.2'

updated grails-datastore-test-support

grails-datastore-test-support was updated after releasing Grails 2.4.3 . You should use grails-datastore-test-support version 1.0.1-grails-2.4 for Grails 2.4.3.

dependencies {
   test "org.grails:grails-datastore-test-support:1.0.1-grails-2.4"
This contains fixes for the HibernateTestMixin and MongoDbTestMixin support that is available in Grails 2.4.x .

Changes in hibernate4 plugin auto flushing behaviour in plugin version

In previous versions, the hibernate4 plugin's flush mode for the Open Session in View Interceptor (OSIVI) has been always "manual" regardless of the setting defined in hibernate config block's "flush.mode" setting. This has been changed to be consistent with hibernate plugin (Hibernate 3). This makes it easier to port existing applications using the hibernate plugin to hibernate4 plugin.

IMPORTANT! It is recommended to set Hibernate OSIVI flush mode to "manual" for applications that haven't been upgraded from Hibernate 3 plugin. OSIVI flush mode was always "manual" for plugin versions before version.

Add the "flush.mode = 'manual'" setting to the hibernate config block in grails-app/conf/DataSource.groovy file of your application

hibernate {
   flush.mode = 'manual'

It should be noted that the default HibernateTransactionManager switches the flush mode of the current session to AUTO when the transaction starts. This behaviour exists in both Hibernate3 and Hibernate4. The flush mode setting of the OSIVI doesn't have effect in transactional context. The flush mode setting of the current session gets switched to MANUAL for read-only transactions.

Known issues

Resetting metaClass changes in unit tests

Grails 2.4.3 changed the way how metaClass changes are resetted between test methods in a single test class. This was a side-effect of fixing GRAILS-11579.

Jira issue: GRAILS-11661 metaClass isn't being properly cleaned up after unit test

The current workaround before Grails 2.4.4 is to add the FreshRuntime annotation to each test method in the test class. FreshRuntime annotation is designed to be used at class (type) or method level. However there is a bug GRAILS-11626 in the class level usage which will be fixed for Grails 2.4.4 . There is a feature request to add a "DirtiesRuntime" annotation which will stop the current running test runtime after running a test method and also clear metaclass changes.

Release Information