10-10-2013 07:36 AM
public final class CustomProcessEngine {
..
private CustomProcessEngine(){
try {
//Config laden
Config config = new Config();
config.load("/data/pucco/etc", "activiti", "cfg", "sec");
…
this.processEngine=new CustomProcessEngineConfiguration()
.setDatabaseType(config.gets(this.getClass(), "databaseType"))
.setDatabaseSchemaUpdate(config.gets(this.getClass(), "databaseShemaUpdate"))
.setJdbcDriver(config.gets(this.getClass(), "jdbcDriver"))
.setJdbcUrl(config.gets(this.getClass(), "jdbcUrl"))
.setJdbcUsername(config.gets(this.getClass(), "jdbcUsername"))
.setJdbcPassword(config.gets(this.getClass(), "jdbcPassword"))
.setJobExecutorActivate(Boolean.getBoolean(config.gets(this.getClass(), "jobExecutorActivate")))
.setHistory(config.gets(this.getClass(), "history")).buildProcessEngine();
} catch (FileNotFoundException e) {
logger.log(LogLevel.ERR, e.getMessage());
throw new ActivitiException("Config file not found!!");
} catch (IOException e) {
logger.log(LogLevel.ERR, e.getMessage());
throw new ActivitiException("Config file corrupt!!");
}
}
public synchronized static CustomProcessEngine getInstance() {
if (instance == null) {
instance = new CustomProcessEngine();
}
return instance;
}
public ProcessEngine getProcessEngine(){
return this.processEngine;
}
}
public class CustomProcessEngineConfiguration extends StandaloneProcessEngineConfiguration {
private Config config;
@Override
public ProcessEngine buildProcessEngine() {
configure();
init();
Map<Class< ? >, SessionFactory> sessionFactories = this.getSessionFactories();
sessionFactories.put(GroupEntityManager.class, new LDAPGroupManagerFactory(this.config));
sessionFactories.put(UserEntityManager.class, new LDAPUserManagerFactory(this.config));
this.setSessionFactories(sessionFactories);
this.setFailedJobCommandFactory(new CustomFailedJobCommandFactory());
return new ProcessEngineImpl(this);
}
private void configure(){
this.config = new Config();
try {
this.config.load("/data/pucco/etc", "ldap", "cfg", "sec");
} catch (FileNotFoundException e) {
throw new ActivitiException("Config file not found!!");
} catch (IOException e) {
throw new ActivitiException("Config file corrupt!!");
}
}
//Starting the process engine
processEngine = CustomProcessEngine.getInstance().getProcessEngine();
java.lang.NoSuchMethodError: pucco.activiti.custom.CustomProcessEngineConfiguration.setDatabaseType(Ljava/lang/String;)Lorg/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl;
at pucco.activiti.custom.CustomProcessEngine.<init>(CustomProcessEngine.java:46)
at pucco.activiti.custom.CustomProcessEngine.getInstance(CustomProcessEngine.java:68)
…
10-10-2013 08:10 AM
10-10-2013 08:13 AM
10-11-2013 02:39 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.