public boolean validateSubsequentDomain(Element dbResult) {
        final DomainPair domainPair = new DomainPair(getServerName(), fromDomain);
        ServerDialback method = new ServerDialback(getConnection(), domainPair);
        try {
            method.validateRemoteDomain(dbResult, getStreamID());

            final String recipient = dbResult.attributeValue("to");
            final String remoteDomain = dbResult.attributeValue("from");

            // Add the validated domain as a valid domain. Do this before notifying the remote domain of success! (OF-2626)
            setAuthenticationMethod(AuthenticationMethod.DIALBACK);
            addValidatedDomain(remoteDomain);

            // Report success to the peer.
            final Namespace ns = Namespace.get("db", "jabber:server:dialback");
            final Document outbound = DocumentHelper.createDocument();
            final Element root = outbound.addElement("root");
            root.add(ns);
            final Element result = root.addElement(QName.get("result", ns));
            result.addAttribute("from", recipient);
            result.addAttribute("to", remoteDomain);
            result.addAttribute("type", "valid");

            // The namespace was already defined in a parent element that was sent earlier. Strip it from the XML.
            final String send = result.asXML().replaceAll(ns.asXML(), "").replace("  "," ");
            getConnection().deliverRawText(send);

            return true;
        } catch (StreamErrorException e) {
            Log.info("Unable to validate domain '{}' (full stack trace is logged on debug level): {}", fromDomain, e.getStreamError().getText());
            Log.debug("Unable to validate domain '{}'", fromDomain, e);
            getConnection().deliverRawText(e.getStreamError().toXML());

            // Close the underlying connection
            getConnection().close();
        } catch (ServerDialbackErrorException e) {
            Log.debug( "Unable to validate domain '{}': (full stack trace is logged on debug level): {}", fromDomain, e.getError().getText());
            Log.debug("Unable to validate domain '{}'", fromDomain, e);

            // The namespace was already defined in a parent element that was sent earlier. Strip it from the XML.
            final Namespace ns = Namespace.get("db", "jabber:server:dialback");
            final String send = e.toXML().asXML().replaceAll(ns.asXML(), "").replace("  "," ");
            getConnection().deliverRawText(send);
        } catch (ServerDialbackKeyInvalidException e) {
            Log.debug( "Dialback key is invalid. Sending verification result to remote domain." );

            // The namespace was already defined in a parent element that was sent earlier. Strip it from the XML.
            final Namespace ns = Namespace.get("db", "jabber:server:dialback");
            final String send = e.toXML().asXML().replaceAll(ns.asXML(), "").replace("  "," ");
            getConnection().deliverRawText(send);
            Log.debug( "Close the underlying connection as key verification failed." );
            getConnection().close();
        }
        return false;
    }
Returns true if the request of a new domain was valid. Sessions may receive subsequent
domain validation request. If the validation of the new domain fails then the session and
the underlying TCP connection will be closed.<p>

For optimization reasons, the same session may be servicing several domains of a
remote server.

@param dbResult the DOM stanza requesting the domain validation.
@return true if the requested domain was valid.
xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalIncomingServerSession.java