[Geoserver-devel] [JIRA] (GEOS-7624) Allow GeoServerExtensions.bean to check for ExtensionPriority instead of blindly throwing an Exception

Alessio Fabiani created an issue

GeoServer / ImprovementGEOS-7624

Allow GeoServerExtensions.bean to check for ExtensionPriority instead of blindly throwing an Exception

Issue Type:

ImprovementImprovement

Assignee:

Alessio Fabiani

Created:

05/Jul/16 6:36 PM

Priority:

MediumMedium

Reporter:

Alessio Fabiani

When using the static method “GeoServerExtensions.bean” in order to retrieve a bean from the ApplicationContext, if it finds more than one instance of the Class it throws a MultipleBeansException.

The behavior is OK in general, but as a GeoServer Developer I would like the possibility of allowing it to check if the beans are an instance of ExtensionPriority and in that case just return the first one instead of throwing an Exception.

This may be very useful as an instance when checking for ResourceManagers from the Security Context. If I have two plugins GeoServer won’t start. If I need to build my own ResourceManager which is a decisor for the others installed, I do not have the possibility of installing it along with other security plugins.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.126.1#100004-sha1:15ab2b1)

Atlassian logo