+
+      if (conf.getObject(protocolName) != null) {
+        return (Protocol) conf.getObject(protocolName);
+      } else {
+        Extension extension = findExtension(protocolName);
+        if (extension == null) {
+          throw new ProtocolNotFound(protocolName);
+        }


I'm somewhat worried about the possible clash in the conf name-space - usually, when we store Object's in Configuration instance, we use their full class name, or at least a long and most probably unique string. In this case, we use just "http", "https", "ftp", "file" and so on ... Would it make sense if in this special case we used the X_POINT + protocolName as the unique string?

Perhaps I'm worrying too much ... ;)

I changed the code as you proposed. In the long run I would like to see this kind of caching stuff refactored to either Configuration or to the plugin system or perhaps if we start using some kind of component container then there.

--
Sami Siren

Reply via email to