A better way to load a shib v2 service with no configuration ?

Tom Zeller tzeller at unicon.net
Tue Jan 3 01:31:34 GMT 2012


I need to define a shib v2 service (grouper as a provisioning target)
whose configuration is found on the classpath, so no configuration
resource is necessary. However, a configuration resource is required
to load the service. So, I created an "empty bean" xml config and java
class and pass them as the configuration resource.

Yeah, horrible. Is there a better way ?

Happy New Year,
TomZ

services.xml :

 <!-- The grouper provisioning service target. -->
 <Service id="grouper" xsi:type="psp-grouper-target:GrouperTarget" >
   <!-- A <ConfigurationResource/> is required to instantiate the
<Service/>, so supply a do-nothing resource. -->
   <ConfigurationResource
     file="/edu/internet2/middleware/psp/util/empty-bean.xml"
     xsi:type="resource:ClasspathResource" />
 </Service>

emtpy-bean.xml :

<beans...>
   <bean id="emptyBean"
class="edu.internet2.middleware.psp.util.EmptyBean" />
</beans>

EmptyBean.java :

package edu.internet2.middleware.psp.util;

/**
 * Just an empty class.
 */
public class EmptyBean {

}


More information about the dev mailing list