public static void clearRoomChatFromDB(MUCRoom room) {
        Log.debug("Attempting to clear the chat history of room '{}' from the database.", room.getName());

        if (!room.isPersistent() || !room.wasSavedToDB()) {
            return;
        }
        Connection con = null;
        PreparedStatement pstmt = null;
        boolean abortTransaction = false;
        try {
            con = DbConnectionManager.getTransactionConnection();
            pstmt = con.prepareStatement(CLEAR_ROOM_CHAT_HISTORY);
            pstmt.setLong(1, room.getID());
            pstmt.executeUpdate();
        }
        catch (SQLException sqle) {
            Log.error("A database error occurred while trying to delete room: {}", room.getName(), sqle);
            abortTransaction = true;
        }
        finally {
            DbConnectionManager.closeStatement(pstmt);
            DbConnectionManager.closeTransactionConnection(con, abortTransaction);
        }
    }
Clears the chat history for a room

@param room the room to cleaer chat history from
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MUCPersistenceManager.java