On http://mail.jabber.org/pipermail/operators/2009-August/000643.html was reported that Openfire isn't RFC compliant on resolving DNS records. This causes problems with XMPP domains that provides multiple SRV records especially Google S2S connections.
The supportMultipleSRVEntries.patch provides a method to get a sorted list of SRV host addresses and uses this on creating a LocalOutgoingServerSession and in the ServerDialback. The former method will be marked as deprecated.
Second version of the patch: corrected typos and such.
After a short chat with Guus I commited my patch to r11221.
Fixed it also for the connection manager.