Start a cybernode & a monitor. Go to the examples/events directory and run mvn install -Dmaven.test.skip, then run mvn rio:deploy. Once deployed run mvn rio:undeploy.
Change a source file and rebuild. Then (re-)deploy (mvn rio:deploy). You will get the following:
SEVERE: Failed to load the ServiceBean [Hospital] classpath []
java.io.FileNotFoundException: JAR entry HospitalConfig.groovy not found in /Users/dreedy/.m2/repository/org/rioproject/examples/hospital/1.0/hospital-1.0.jar
at sun.net.
www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
at sun.net.
www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:132)
at java.net.URL.openStream(URL.java:1010)
at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
at org.rioproject.config.GroovyConfig.traverseInputs(GroovyConfig.groovy:92)
at org.rioproject.config.GroovyConfig$traverseInputs.callCurrent(Unknown Source)
at org.rioproject.config.GroovyConfig.<init>(GroovyConfig.groovy:57)
at sun.reflect.GeneratedConstructorAccessor50.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvider.java:236)
at org.rioproject.config.AggregateConfig.<init>(AggregateConfig.java:73)
at org.rioproject.jsb.JSBContext.getConfiguration(JSBContext.java:224)
at org.rioproject.cybernode.ServiceBeanLoader.load(ServiceBeanLoader.java:425)
at org.rioproject.cybernode.JSBDelegate$1.run(JSBDelegate.java:528)
In order to get around this behavior, GroovyConfig will no longer rely on creatin a URL and opening a connection to the URL to obtain the InputStream of the configuration to parse.
GroovyConfig will first check to see if the configuration file to be loaded is to be loaded from a jar:, if so, GroovyConfig uses the provided ClassLoader (if not provided the current thread's context ClassLoader), then gets the name of the resource to load. The resource to load will be of the form:
jar:file:/Users/dreedy/.m2/repository/org/rioproject/examples/hospital/1.0/hospital-1.0.jar!/DoctorConfig.groovy
where the resource is "DoctorConfig.groovy"
If the configuration does not start with "jar:", a configuration file (not a classpath resource) is assumed.