public static boolean isRoomRetired(String roomName, MultiUserChatService multiUserChatService) {
        Connection connection = null;
        PreparedStatement statement = null;
        ResultSet resultSet = null;
        try {
            connection = DbConnectionManager.getConnection();
            statement = connection.prepareStatement(CHECK_RETIREES);
            statement.setLong(1, XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(multiUserChatService.getServiceName()));
            statement.setString(2, roomName);
            resultSet = statement.executeQuery();
            return resultSet.next();
        }
        catch (SQLException sqle) {
            Log.error("A database error prevented checking MUC room retired state.", sqle);
            return true; // Assume retired if we can't check.
        }
        finally {
            DbConnectionManager.closeConnection(resultSet, statement, connection);
        }
    }
Check if a room name is retired for a given service.

@param roomName the name of the room to check.
@param multiUserChatService the service to check the room name against.
@return true if the room name is retired for the supplied service, false otherwise.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MUCPersistenceManager.java