@SuppressWarnings("unchecked")
public EnvGenerator() {
applicationVariables = new HashMap<String, String>();
blockVariables = new HashMap<String, String>();
this.setAPIType(Context.AutoDetect);
setRuntimeHibernateConf();
String commandServiceConfigXml = "<command-service>\n";
commandServiceConfigXml += defaultIndent + "<retry-interceptor />\n";
commandServiceConfigXml += defaultIndent + "<environment-interceptor />\n";
commandServiceConfigXml += defaultIndent + "<standard-transaction-interceptor />\n";
commandServiceConfigXml += "</command-service>\n";
this.setApplicationEntry("command-service", commandServiceConfigXml);
this.setApplicationEntry("job-executor", "<job-executor threads='1' auto-start='true' />");
this.setApplicationEntry("type-resolver", "<variable-types resource='bonita.type.resolver.xml' />");
this.setRepositoryType(DbRepository.class, "<arg><string value='"
+ EnvConstants.CORE_PERSISTENCESERVICE_NAME + "' /></arg>");
this.setBlockEntry("transaction", "<transaction />");
this.setJournalType(DbJournal.class, "<arg><string value='"
+ EnvConstants.CORE_PERSISTENCESERVICE_NAME + "' /></arg>");
this.setFinishedInstanceHandlerType(DeleteFinishedInstanceHandler.class, ArchiveFinishedInstanceHandler.class);
this.setUndeployedPackageHandlerType(ArchiveUndeployedPackageHandler.class);
this.setRecorderType(LoggerRecorder.class);
this.setArchiverType(LoggerArchiver.class);
this.setHistoryType(XMLHistory.class);
this.setBlockEntry("timer_session", "<timer-session />");
this.setBlockEntry("job-session", "<job-db-session session='" + EnvConstants.CORE_HB_SESSION_NAME + "' />");
}