Dennis, can you add any additional information about how configurations of multiple things are put together in either single files, or how multiple files are integrated together? I do like the simplicity and the power of this.

It might also be interesting to see if a Scala version would be interesting or have any different capabilities since there are additional language features there too.

Gregg Wonderly

Dennis Reedy wrote:

On Jul 13, 2009, at 753AM, Tom Hobbs wrote:


Someone on the Jini-Users (or similar, I can't quite remember) a while
ago was talking about using Groovy classes to describe service
configuration.  Something like this sounds pretty neat, but anything
that needs to be recompiled for changes can take affect is likely to be
unworkable for obvious reasons.

I brought up the Groovy config support. Rio has switched over from the Jini configuration file approach to now use Groovy classes. No compilation is required, the Groovy classes are parsed when loaded by the GroovyConfiguration utility. A simple example of a Groovy configuration for Reggie follows:

@Component('com.sun.jini.reggie')
class ReggieConfig {

    String[] getInitialMemberGroups() {
def groups = [System.getProperty(Constants.GROUPS_PROPERTY_NAME, 'rio')]
        return (String[])groups
    }

    String getUnicastDiscoveryHost() {
        return java.net.InetAddress.getLocalHost().getHostAddress()
    }

}

Reply via email to