A commercial clustering plugin was available some time ago. This plugin was made open source, see http://www.igniterealtime.org/projects/openfire/plugins.jsp without the Coherence files. Currently one does need an old Coherence version to get it running,
If one wants to create a clustering plugin based on an existing clustering solution one does need to look at the packages org.jivesoftware.util.cache and org.jivesoftware.openfire.cluster. In those packages one will find interfaces like: