Skip to content
Browse files

docs on forked mode, what's new in 2.2 guide etc.

  • Loading branch information...
1 parent ed730da commit a729f6f1e155b467ff8f6c3d1aab480f750d9a7f @graemerocher graemerocher committed Sep 12, 2012
View
1 quick-publish.sh
@@ -0,0 +1 @@
+./gradlew -Ddisable.groovydocs=true -Den.only=true -Dgrails.home=../grails-master docs
View
48 src/en/guide/commandLine/forkedMode.gdoc
@@ -0,0 +1,48 @@
+h4. Forked Tomcat Execution
+
+Grails 2.2 and above support forked JVM execution of the Tomcat container in development mode. This has several benefits including:
+
+* Reduced memory consumption, since the Grails build system can exit
+* Isolation of the build classpath from the runtime classpath
+* The ability to deploy other Grails/Spring applications in parallels without conflicting dependencies
+
+To enable forked execution you can set the @grails.project.fork.run@ property to @true@:
+
+{code}
+grails.project.fork.run=true
+{code}
+
+Then just us the regular @run-app@ command as per normal. Note that in forked mode the @grails@ process will exit and leave the container running in the background. To stop the server there is a new @stop-app@ command:
+
+{code}
+grails stop-app
+{code}
+
+To customize the JVM arguments passed to the forked JVM you can specify a map instead:
+
+{code}
+grails.project.fork.run= [maxMemory:1024, minMemory:64, debug:false, maxPerm:256, jvmArgs: '..arbitrary JVM arguments..']
+{code}
+
+h4. Auto-deploying additional WAR files in Forked Mode
+
+Since forked execution isolates classpaths more effectively than embedded execution you can deploy additional WAR files (such as other Grails or Spring applications) to the container.
+
+The easiest way to do so is to drop the WAR files into the @src/autodeploy@ directory (if it doesn't exist you can create it).
+
+You can customize the location of the autodeploy directory by specifying an alternative location in @BuildConfig.groovy@:
+
+{code}
+grails.project.autodeploy.dir="/path/to/my/war/files"
+{code}
+
+h4. Customizing the Forked Tomcat instance
+
+If you want to programmatically customize the forked [Tomcat|http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/startup/Tomcat.html] instance you can do so by implementing a class named @org.grails.plugins.tomcat.ForkedTomcatCustomizer@ which provides a method with the following signature:
+
+{code}
+void customize(Tomcat tomcat) {
+ // your code here
+}
+{code}
+
View
2 src/en/guide/introduction/whatsNew21.gdoc
@@ -6,7 +6,7 @@ Grails' Maven support has been improved in a number of significant ways. Firstly
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>hibernate</artifactId>
- <version>2.1.0.RC1</version>
+ <version>2.1.0</version>
<type>zip</type>
<scope>compile</scope>
</dependency>
View
17 src/en/guide/introduction/whatsNew22.gdoc
@@ -0,0 +1,17 @@
+h4. Namespace Support
+
+TODO
+
+h4. Forked Tomcat Execution
+
+Grails 2.2 supports forked JVM execution of the Tomcat container in development mode. This has several benefits including:
+
+* Reduced memory consumption, since the Grails build system can exit
+* Isolation of the build classpath from the runtime classpath
+* The ability to deploy other Grails/Spring applications in parallels without conflicting dependencies
+
+See the [documentation|guide:forkedMode] on using forked mode for more information.
+
+h4. Groovy 2
+
+Grails 2.2 ships with Groovy 2.0, which has a [bunch of new features|http://www.infoq.com/articles/new-groovy-20] itself.
View
2 src/en/guide/toc.yml
@@ -1,5 +1,6 @@
introduction:
title: Introduction
+ whatsNew22: What's new in Grails 2.2?
whatsNew21: What's new in Grails 2.1?
whatsNew:
title: What's new in Grails 2.0?
@@ -60,6 +61,7 @@ conf:
commandLine:
title: The Command Line
interactiveMode: Interactive Mode
+ forkedMode: Forked Tomcat Execution
creatingGantScripts: Creating Gant Scripts
reusingGrailsScripts: Re-using Grails scripts
events: Hooking into Events
View
19 src/en/ref/Command Line/stop-app.gdoc
@@ -0,0 +1,19 @@
+h1. stop-app
+
+h2. Purpose
+
+Stops the Grails container started as a background process using [Forked Mode|guide:forkedMode]
+
+
+h2. Examples
+
+{code:java}
+grails stop-app
+{code}
+
+h2. Description
+
+Usage:
+{code:java}
+grails stop-app
+{code}

0 comments on commit a729f6f

Please sign in to comment.
Something went wrong with that request. Please try again.