public boolean isLocal( JID jid )
    {
        return jid != null && jid.getDomain().equals( xmppServerInfo.getXMPPDomain() );
    }
Returns true if the given address is local to the server (managed by this
server domain). Return false even if the jid's domain matches a local component's
service JID.

@param jid the JID to check.
@return true if the address is a local address to this server.
xmppserver/src/main/java/org/jivesoftware/openfire/XMPPServer.java