Can you illustrate how a subclass extension works? I don't know enough about annotations to know how super and subclass definitions allow the subclass to be identified as the "french.fry.bean" to use.

Switching away from 'french.fry.bean' to something perhaps more germane...

Lets take a simple configuration for reggie (reggie.groovy):

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

    String[] getInitialMemberGroups() {
        def groups = [System.getProperty('user.name')]
        return (String[])groups
    }

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

}

Creating a persistent reggie configuration would look like (persistent- reggie.groovy):

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

    String getPersistenceDirectory() {
        String rioHome = System.getProperty('RIO_HOME')
        return rioHome+'/logs/reggie.log.dir'
    }

}

When creating the ServiceStarter for reggie, you create your configuration arguments as follows (cast them to (String[])) :

def reggieConfigs = [rioHome+'/config/reggie.groovy',
rioHome+'/config/ persistent_reggie.groovy']

Does that help?



Reply via email to