tags:

views:

176

answers:

1

I am looking at using groovy scripts in an existing web application and am busy setting up and configuring the GroovyScriptEngine.

What are the "best practices" for managing the scripts in the container ?

  1. Should I store them in a database and then serve them up to the engine via urls ?
  2. I could store them in the file system on the server - however that seems problematic in Tomcat/JBoss ?

Any suggestions welcome :)

+1  A: 

You can instantiate the GroovyScriptEngine with a ResourceConnector implementation of your own. This can use java.lang.Class.getResource to get the script that you embed in the war file.

If you need to be able to dynamically change the script then a database may be a good idea.

krosenvold
Would you have one GSE for the whole app or are they lightwieght to create ?
LenW