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

Tom Zeller tzeller at unicon.net
Wed Jan 4 19:11:58 GMT 2012


Thanks Chad.

 https://issues.shibboleth.net/jira/browse/SIDP-533

No hurry.

On Wed, Jan 4, 2012 at 8:09 AM, Chad La Joie <lajoie at shibboleth.net> wrote:
> Tom, you can file an issue for this if you'd like.  That's something I
> could easily fix in the next patch (whenever that is).
>
> On 1/3/12 10:04 AM, Tom Zeller wrote:
>>> what do you mean by "a configuration resource is required
>>> to load the service". If I take a look at the
>>> shibboleth-2.0-services.xsd, the element ConfigurationResource of the
>>> abstract service type is declared as 0-to-unbounded.
>>
>> Right, minOccurs="0" in the xsd, but in BaseService.java, if there are
>> no service configurations the context is not loaded :
>>
>>  protected void loadContext() throws ServiceException {
>>   log.info("Loading new configuration for service {}", getId());
>>
>>   if(serviceConfigurations == null || serviceConfigurations.isEmpty()){
>>    setInitialized(true);
>>    return;
>>   }
>>
>>  GenericApplicationContext newServiceContext = new
>> GenericApplicationContext(getApplicationContext());
>>  ...
>>
>>> Does the code itself require it or does your "GrouperTarget" service
>>> type overwrite the schema?
>>
>> No overwrite, the grouper target implements (extends) a Service.
>>
>>> A minor improvement -but still not a nice solution- is to use
>>> java.lang.Object as an empty bean class.


More information about the dev mailing list