AnsweredAssumed Answered

Loosing database connections

Question asked by tomdc on Nov 15, 2011
Latest reply on Nov 16, 2011 by falko.menge
Hi,

I'm using the following code with activiti 5.7 on postgresql

        ProcessEngine processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault(). buildProcessEngine();
        TaskService taskService = processEngine.getTaskService();

        taskService.claim(task, user);
        taskService.complete(task , taskMapVariables);

        processEngine.close();

Everytime I execute this code I'm loosing 2 database connections ( select count(*) from pg_stat_activity;)
However, when I put the taskService.claim in comments I don't have this problem.

Is this the wrong way to complete a task?

Thanks

Outcomes