Details
Description
Consider deprecating the priority field in org.geotools.factory.AbstractFactory. We could introduce a protected ordering(Object other) method (or something like that) instead. This method would returns +1 if this factory consider that it should have precedence over the specified factory, -1 if the other factory should have precedence, or 0 otherwise. Such approach would be more consistent with the J2SE ServiceRegistry.setOrdering(...) method. It is also a better match of pratical situations: it is quite inconvenient to define an absolute priority number (it force to take in consideration all known factories), and also cause a useless ordering between unrelated factories. Furthermore, experience suggest that the current "priority" level mechanism is badly suited for ordering between org.geotools.referencing.factory.epsg.DefaultFactory instances backed by different versions of EPSG database.
http://geotidy.geomatys.fr/apidocs/org/geotools/factory/Factory.html#setOrdering(org.geotools.factory.Factory.Organizer)