@Nullable
    private String loadServiceSubdomain(final long serviceID) {
        Connection con = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        String subdomain = null;
        try {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement(LOAD_SUBDOMAIN);
            pstmt.setLong(1, serviceID);
            rs = pstmt.executeQuery();
            if (rs.next()) {
                subdomain = rs.getString(1);
            }
        }
        catch (Exception e) {
            Log.error("A database exception occurred while trying to load the subdomain for MUC service with database ID {} from the database.", serviceID, e);
        }
        finally {
            DbConnectionManager.closeConnection(rs, pstmt, con);
        }
        Log.trace("Loaded service name for service with ID {}", serviceID);
        return subdomain;
    }
Gets a specific subdomain by a service's ID number.

@param serviceID ID to retrieve subdomain for.
@return Subdomain of service, or null if no such service was found.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MultiUserChatManager.java