Package org.camunda.bpm.engine.impl.db.entitymanager

Examples of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManagerFactory


    if (sessionFactories==null) {
      sessionFactories = new HashMap<Class<?>, SessionFactory>();

      initPersistenceProviders();

      addSessionFactory(new DbEntityManagerFactory(idGenerator));

      addSessionFactory(new GenericManagerFactory(AttachmentManager.class));
      addSessionFactory(new GenericManagerFactory(CommentManager.class));
      addSessionFactory(new GenericManagerFactory(DeploymentManager.class));
      addSessionFactory(new GenericManagerFactory(ExecutionManager.class));
View Full Code Here


      this.id = id;
    }

    public Void execute(CommandContext commandContext) {
      final DbEntityManager dbEntityManger = commandContext.getDbEntityManager();
      final DbEntityManagerFactory dbEntityManagerFactory = new DbEntityManagerFactory(Context.getProcessEngineConfiguration().getIdGenerator());

      HistoricProcessInstanceEventEntity hpi = new HistoricProcessInstanceEventEntity();
      hpi.setId(id);
      hpi.setProcessInstanceId(id);
      hpi.setProcessDefinitionId("someProcDefId");
      hpi.setStartTime(new Date());

      dbEntityManger.insert(hpi);
      dbEntityManger.flush();

      monitor.sync();

      DbEntityManager dbEntityManager = dbEntityManagerFactory.openSession();
      dbEntityManager.createHistoricProcessInstanceQuery().list();

      monitor.sync();

      return null;
View Full Code Here

    if (sessionFactories==null) {
      sessionFactories = new HashMap<Class<?>, SessionFactory>();

      initPersistenceProviders();

      addSessionFactory(new DbEntityManagerFactory(idGenerator));

      addSessionFactory(new GenericManagerFactory(AttachmentManager.class));
      addSessionFactory(new GenericManagerFactory(CommentManager.class));
      addSessionFactory(new GenericManagerFactory(DeploymentManager.class));
      addSessionFactory(new GenericManagerFactory(ExecutionManager.class));
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManagerFactory

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.