Groovy & Grails Israel user group meetup is up and running…

Groovy & Grails Israel User Group
Groovy & Grails Israel User Group

just establish today the new meetup group for the groovy & Grails community in Israel
so: “Meet other Groovy and Grails developers and share knowledge. We will talk about code, architecture, performance, testing, deployment & hosting. The group is Both for beginners and pros.”

please join in: http://www.meetup.com/Groovy-Grails-Israel-Meetup-Group/

Running bootstrap with Grails Console

you want to test or check your domain model after setting your environment or creating some data on the bootStrap:

How to run the bootstrap from Grails console and set the ApplicationContext and the grailsApplication

from the Grails documentation:

Starts the Grails console, which is an extended version of the regular Groovy console. There are a couple of useful variables registered in the binding:
ctx – The Spring ApplicationContext instance
grailsApplication – The GrailsApplication instance

if you are using the ‘GrailsApplication’ in your bootstrap implement a setter for the grailsApplication
like:

def setGrailsApplication = { grailsApp->
        grailsApplication = grailsApp
}

on the console write:

def b = new BootStrap()
b.setGrailsApplication(grailsApplication)
b.init(ctx.servletContext)

and now you can write and run your code...

Im going to Grails exchange 201 in London on Dec 8-9th

next wee i’ll attend the yearly Groovy and Grails conf. in London.
2 days of talks, open-space discussions and brainstorming with core committers and leading experts, including Guillaume LaForge, Peter Ledbrook, Jeff Brown, Burt Beckwith and may others, to learn and share the latest innovative ideas, best tools and practices for enterprise web development with Groovy and Grails.

How to set the session timeout

1. add to all sessions

install the grails templates so you can edit the web.xml file:

grails install-templates

add to src/templates/war/web.xml

<session-config>

<session-timeout>600</session-timeout>

</session-config>

the value is in minutes

2. to a specific session/user

add in the controller :

def sec = 3600 // 1 Hour in seconds
session.setMaxInactiveInterval(sec);

restart the server…