powered by Jive Software

Provider Manager Patch

Please find attached a patch that affects the Provider Manager implementation. There were several issues with it, the most relevant being that it’s extension mechanism relied in class inheritance while that class is a Singleton and has a private (hence unacessible) constructor. Also, the Provider Manager does not allow for namespace-scoped Providers, which many times make more sense than element-scoped Providers.

The changes to the Provider Manager in the patch are expected to be completely retro-compatible while enhancing it’s functionality and fixing the extension bug. However since there are no pre-existing unit tests for the Provider Manager I cannot guarantee that at this point. I did, however, build Smack, put the resulting jars in the build/lib/dist folder of the Spark source (replacing the existing ones) and built and tested Spark MUC (that uses Provider Manager) successfully. While that is not a guarantee, it is a good sign.

The changes in the patch are somewhat trivial but they enable relevant functionality in Smack Provider-based extension mechanism. Please consider it for inclusion.

Regards,

João
patch.patch.zip (6504 Bytes)

1 Like

Thanks for the patch. But the patch file is pretty big, since it includes many code-style non-semantic changes. It’s hard to spot for me where you actually made changes to the code. Could you generate an patch, that only shows the diffs of the actual changes?

Flow

Hi Flow,

Yes, sorry about that. I was trying to comply with code formating guidelines and keeping Javadoc comments updated…

You can find a new version of the patch here: http://jmgoncalv.es/patch.patch (not possible to attach files in replies?) It has a minor code change from the first patch and it is way more legible. I can address the javadoc changes in a separate patch if required.

Cheers,

João

Here is the javadoc (unformated) patch (from trunk): http://jmgoncalv.es/javadoc.patch

Let me know that you think.

I have updated the existing issue related to ProviderManager (SMACK-286) so it now includes your patch as well. Basically, the class needs to be refactored in one way or another to allow providers file(s) to be read from multiple (or alternative) locations.