private void createLinkedThread(Map<String, Object> jsonrpc2Params) throws Exception {
        Map<String, Object> params = getParams(jsonrpc2Params,
                new NullableExtendedParam(Constants.Param.Name.PRIVATE_CATEGORY_ID, false),
                new NullableExtendedParam(Constants.Param.Name.THREAD_ID, false),
                new NullableExtendedParam(Constants.Param.Name.HEADLINE, true));

        int privateCategoryId = (Integer)params.get(Constants.Param.Name.PRIVATE_CATEGORY_ID);
        String headline = (String) params.get(Constants.Param.Name.HEADLINE);
        int threadId = (Integer)params.get(Constants.Param.Name.THREAD_ID);

        Thread thread = em.getReference(Thread.class, threadId);
        PrivateCategory privateCategory = em.find(PrivateCategory.class, privateCategoryId);
        if(thread == null || privateCategory == null){
            responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.OBJECT_NOT_FOUND);
            return;
        }

        if(privateCategory.getAccount().getId() != accountId){
            throwJSONRPC2Error(JSONRPC2Error.INVALID_PARAMS, Constants.Errors.ACTION_NOT_ALLOWED);
        }
        if(headline == null){
            headline = thread.getHeadLine();
        }

        LinkedThread linkedThread = new LinkedThread(headline, em.getReference(PrivateCategory.class, privateCategoryId), em.getReference(Account.class, accountId), thread);
        persistObjects(linkedThread);
        responseParams.put(Constants.Param.Name.LINKED_THREAD, serialize(linkedThread));
        responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.SUCCESS);
    }