private DbPersistenceServiceFactory getPersistenceServiceFactory(String jbpmContextName) { return (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE, jbpmContextName); }
public ServiceFactory getServiceFactory(String serviceName) { return getServiceFactory(serviceName, JbpmContext.DEFAULT_JBPM_CONTEXT_NAME); }
public ServiceFactory getServiceFactory(String serviceName) { return getServiceFactory(serviceName, JbpmContext.DEFAULT_JBPM_CONTEXT_NAME); }
private DbPersistenceServiceFactory getPersistenceServiceFactory(String jbpmContextName) { return (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE, jbpmContextName); }
private void assertNoTransactionManagement() { DbPersistenceServiceFactory dpsf = (DbPersistenceServiceFactory) jbpmContext.getJbpmConfiguration() .getServiceFactory(Services.SERVICENAME_PERSISTENCE); if ( dpsf.isTransactionEnabled() ) { throw new IllegalStateException("jBPM transaction management is enabled, disable in jbpm.cfg.xml"); } }
protected void ensureCleanDatabase() { DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) getJbpmConfiguration().getServiceFactory("persistence"); if (persistenceServiceFactory == null) return; boolean hasLeftOvers = false; Configuration configuration = persistenceServiceFactory.getConfiguration(); JbpmSchema jbpmSchema = new JbpmSchema(configuration); for (Iterator i = jbpmSchema.getRowsPerTable().entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); Long count = (Long) entry.getValue(); if (count.intValue() != 0) { hasLeftOvers = true; log.error(getName() + " left " + count + " records in " + entry.getKey()); } } if (hasLeftOvers) { jbpmSchema.cleanSchema(); } }
private void ensureCleanDatabase() { DbPersistenceServiceFactory persistenceServiceFactory = (DbPersistenceServiceFactory) getJbpmConfiguration().getServiceFactory("persistence"); if (persistenceServiceFactory == null) return; boolean hasLeftOvers = false; JbpmHibernateConfiguration jbpmHibernateConfiguration = persistenceServiceFactory.getJbpmHibernateConfiguration(); JbpmSchema jbpmSchema = new JbpmSchema(jbpmHibernateConfiguration); for (Iterator i = jbpmSchema.getRowsPerTable().entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); Long count = (Long) entry.getValue(); if (count.intValue() != 0) { hasLeftOvers = true; log.error(getName() + " left " + count + " records in " + entry.getKey()); } } if (hasLeftOvers) { jbpmSchema.cleanSchema(); } }
DbPersistenceServiceFactory dbpsf = (DbPersistenceServiceFactory) jbpmConfiguration.getServiceFactory("persistence"); if (Naming.getInitialContextProperties()!=null)