Package org.jbpm

Examples of org.jbpm.JbpmException


        // create a new timer
        log.debug("scheduling timer for repeat at "+timer.getDueDate());
        createTimer(timer);
      }
    } catch (Exception e) {
      JbpmException jbpmException = new JbpmException("couldn't execute timer", e);
      log.error(jbpmException);
      throw jbpmException;
    }
  }
View Full Code Here


        // create a new timer
        log.debug("repeating timer "+id);
        createTimer(repeat);
      }
    } catch (Exception e) {
      JbpmException jbpmException = new JbpmException("couldn't execute timer", e);
      log.error(jbpmException);
      throw jbpmException;
    }
  }
View Full Code Here

  LocalTimerService localTimerService;
 
  public EntitySchedulerService() {
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    if (jbpmContext==null) {
      throw new JbpmException("instantiation of the EjbSchedulerService requires a current JbpmContext");
    }
    this.jobSession = jbpmContext.getJobSession();
   
    try {
      Context initial = new InitialContext();
      LocalTimerServiceHome localTimerServiceHome = (LocalTimerServiceHome) initial.lookup("java:comp/env/ejb/LocalTimerServiceBean");
      localTimerService = localTimerServiceHome.create();
    } catch (Exception e) {
      JbpmException jbpmException = new JbpmException("ejb local timer lookup problem", e);
      log.error(e);
      throw jbpmException;
    }
  }
View Full Code Here

  public void close() {
    try {
      log.debug("removing the timer service session bean");
      localTimerService.remove();
    } catch (Exception e) {
      JbpmException jbpmException = new JbpmException("ejb local timer service close problem", e);
      log.error(e);
      throw jbpmException;
    }
  }
View Full Code Here

    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      log.debug("executing " + command);
      result = command.execute(jbpmContext);
    } catch (Exception e) {
      throw new JbpmException("couldn't execute "+command, e);
    } finally {
      jbpmContext.close();
    }
    return result;
  }
View Full Code Here

      // consumptions as part of one transaction (TRUE) or wether you want all productions and consumptions to be instantanious (FALSE)
      // Of course, we never want messages to be received before the current jbpm transaction commits so we just set it to true.
      session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
     
    } catch (Exception e) {
      throw new JbpmException("couldn't open jms message session", e);
    }
   
    return new JmsMessageServiceImpl(connection, session, destination, isCommitEnabled);
  }
View Full Code Here

    this.destination = destination;
    this.isCommitEnabled = isCommitEnabled;
   
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    if (jbpmContext==null) {
      throw new JbpmException("instantiation of the JmsMessageService requires a current JbpmContext");
    }
    this.jobSession = jbpmContext.getJobSession();
  }
View Full Code Here

      if (job.getTaskInstance()!=null) {
        message.setLongProperty("taskInstanceId", job.getTaskInstance().getId());
      }
      getMessageProducer().send(destination, message);
    } catch (JMSException e) {
      throw new JbpmException("couldn't send jms message", e);
    }
  }
View Full Code Here

         ) {
        session.commit();
      }
    } catch (Exception e) {
      if (exception!=null) {
        exception = new JbpmException("couldn't commit JMS session", e);
      } else {
        exception = e;
      }
    }
    try {
      if (session!=null) session.close();
    } catch (Exception e) {
      if (exception!=null) {
        exception = new JbpmException("couldn't close JMS session", e);
      } else {
        exception = e;
      }
    }
    try {
      if (connection!=null) connection.close();
    } catch (Exception e) {
      if (exception!=null) {
        exception = new JbpmException("couldn't close JMS connection", e);
      } else {
        exception = e;
      }
    }
   
    if (exception!=null) {
      throw new JbpmException("couldn't close one of the jms objects", exception);
    }
  }
View Full Code Here

        }
      }
      TimerInfo timerInfo = (TimerInfo) info;
      localCommandService.execute(new ExecuteTimerCommand(timerInfo.getTimerId()));
    } catch (Exception e) {
      JbpmException jbpmException = new JbpmException("couldn't execute timer", e);
      log.error(jbpmException);
      throw jbpmException;
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.JbpmException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.