6 Replies Latest reply on Oct 15, 2009 4:56 PM by iecisa iecisa

    Problem inserting in JBPM_JOB

    iecisa iecisa Newbie

      Hi all,
      we are developing a system, using jbpm. This developemt is under aix, oracle 10g and glassfish 2.1. Connection pool is configured in glassfish using oracleXADatasource because we are using several schemas in the same transaction.
      We have developed workflows with tasks insert jobs in jbpm_job, however this insert using jbpm hibernate. if a task insert 2 jobs, the first one takes too much time (over 10 seconds) but the second one takes only 3 miliseconds. And the call method is the same for both, as you can see below:

      public void AlarmCreate(ExecutionContext executionContext,Date date,String className,String actionName,String timerName){
      Delegation delegation = new Delegation();
      delegation.setClassName(className);
      delegation.setProcessDefinition(executionContext.getProcessDefinition());
      Action moveAction = new Action();
      moveAction.setName(actionName);
      moveAction.setActionDelegation(delegation);
      executionContext.getProcessDefinition().addAction(moveAction);

      Timer timer = new Timer(executionContext.getToken());
      timer.setName(timerName+"_"+executionContext.getProcessInstance().getId());

      timer.setDueDate(date);
      timer.setGraphElement(executionContext.getEventSource());
      timer.setTaskInstance(executionContext.getTaskInstance());
      timer.setAction(moveAction);

      timer.setLockOwner(executionContext.getProcessDefinition().getName());
      DbSchedulerService schservice = new DbSchedulerService();
      schservice.createTimer(timer);
      }

      any help would be really appreciated.

      regards