public boolean isProcessSizeThrottled() { return getProcessThrottledMaximumSize() == Long.MAX_VALUE; }
/** * JDBC driver class (for use in INTERNAL mode). * * @return */ public String getDbInternalJdbcDriverClass() { return getProperty(OdeConfigProperties.PROP_DB_INTERNAL_DRIVER, "org.apache.derby.jdbc.ClientDriver"); }
_bpelServer.setBindingContext(new ODEBindingContext()); _bpelServer.setScheduler(_scheduler); if (_config.isDehydrationEnabled()) { CountLRUDehydrationPolicy dehy = new CountLRUDehydrationPolicy(); dehy.setProcessMaxAge(_config.getDehydrationMaximumAge()); dehy.setProcessMaxCount(_config.getDehydrationMaximumCount()); _bpelServer.setDehydrationPolicy(dehy); _bpelServer.setConfigProperties(_config.getProperties()); _bpelServer.init(); _bpelServer.setInstanceThrottledMaximumCount(_config.getInstanceThrottledMaximumCount()); _bpelServer.setProcessThrottledMaximumCount(_config.getProcessThrottledMaximumCount()); _bpelServer.setProcessThrottledMaximumSize(_config.getProcessThrottledMaximumSize()); _bpelServer.setHydrationLazy(_config.isHydrationLazy()); _bpelServer.setHydrationLazyMinimumSize(_config.getHydrationLazyMinimumSize());
public ProcessStoreImpl(EndpointReferenceContext eprContext, DataSource ds, String persistenceType, OdeConfigProperties props, boolean createDatamodel) { this.eprContext = eprContext; this.generateProcessEventsAll = props.getProperty("generateProcessEvents", "all").equals("all"); if (ds != null) { // ugly hack if (persistenceType.toLowerCase().indexOf("hib") != -1) { _cf = new org.apache.ode.store.hib.DbConfStoreConnectionFactory(ds, props.getProperties(), createDatamodel, props.getTxFactoryClass()); } else { _cf = new org.apache.ode.store.jpa.DbConfStoreConnectionFactory(ds, createDatamodel, props.getTxFactoryClass()); } } else { // If the datasource is not provided, then we create a HSQL-based // in-memory database. Makes testing a bit simpler. DataSource hsqlds = createInternalDS(new GUID().toString()); if ("hibernate".equalsIgnoreCase(persistenceType)) { _cf = new org.apache.ode.store.hib.DbConfStoreConnectionFactory(hsqlds, props.getProperties(), createDatamodel, props.getTxFactoryClass()); } else { _cf = new org.apache.ode.store.jpa.DbConfStoreConnectionFactory(hsqlds, createDatamodel, props.getTxFactoryClass()); } _inMemDs = hsqlds; } }
private void initInternalDb() throws DatabaseConfigException { __log.info(__msgs.msgOdeUsingInternalDb(_odeConfig.getDbIntenralJdbcUrl(), _odeConfig.getDbInternalJdbcDriverClass())); initInternalDb(_odeConfig.getDbIntenralJdbcUrl(), _odeConfig.getDbInternalJdbcDriverClass(), _odeConfig.getDbInternalUserName(), _odeConfig.getDbInternalPassword()); }
public ProcessStoreImpl() { this(null, null, "", new OdeConfigProperties(new Properties(), ""), true); }
public BpelDAOConnectionFactoryJDBC createDaoCF() throws DatabaseConfigException { String pClassName = _odeConfig.getDAOConnectionFactory(); __log.info(__msgs.msgOdeUsingDAOImpl(pClassName)); BpelDAOConnectionFactoryJDBC cf; try { cf = (BpelDAOConnectionFactoryJDBC) Class.forName(pClassName).newInstance(); } catch (Exception ex) { String errmsg = __msgs.msgDAOInstantiationFailed(pClassName); __log.error(errmsg, ex); throw new DatabaseConfigException(errmsg, ex); } cf.setDataSource(getDataSource()); cf.setTransactionManager(_txm); cf.init(_odeConfig.getProperties()); return cf; }
/** * Initialize embedded (H2) database. */ private void initEmbeddedDb() throws DatabaseConfigException { String db = _odeConfig.getDbEmbeddedName(); h2Url = "jdbc:h2:file:" + _workRoot + File.separator + db; String url = h2Url + ";MVCC=TRUE"; __log.info("Using Embedded H2: " + url); initInternalDb(url, org.h2.Driver.class.getName(), "sa", null); _needH2Shutdown = false; }
private void initExternalDb() throws DatabaseConfigException { try { _datasource = (DataSource) lookupInJndi(_odeConfig.getDbDataSource()); __log.info(__msgs.msgOdeUsingExternalDb(_odeConfig.getDbDataSource())); } catch (Exception ex) { String msg = __msgs.msgOdeInitExternalDbFailed(_odeConfig.getDbDataSource()); __log.error(msg, ex); throw new DatabaseConfigException(msg, ex); } }
confProps.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=false)"); _config = new OdeConfigProperties(confProps, "ode-sca");
/** * Should the internal database be used, or are the datasources provided? * * @return db mode */ public String getDbEmbeddedName() { return getProperty(OdeConfigProperties.PROP_DB_EMBEDDED_NAME, __dbEmbName); }
scheduler.setJobProcessor(_server); scheduler.setExecutorService(executorService); store = new ProcessStoreImpl(null, _dataSource, "hib", new OdeConfigProperties(new Properties(), ""), true); store.registerListener(new ProcessStoreListener() { public void onProcessStoreEvent(ProcessStoreEvent event) {
public String getJNDIProviderURLForDataSourceLookup(){ return getProperty(DS_LOOKUP_JNDI_PROVIDER_URL); } public String getExtensionActivityBundlesRT() {
public String getDAOConnectionFactory() { return getProperty(PROP_DAOCF, __daoCfClass); }
public String getDbIntenralJdbcUrl() { return getProperty(OdeConfigProperties.PROP_DB_INTERNAL_URL, "jdbc:derby://localhost/ode"); }
public String getWorkingDir() { return getProperty(OdeConfigProperties.PROP_WORKING_DIR); }
public String getTxFactoryClass() { return getProperty(OdeConfigProperties.PROP_TX_FACTORY_CLASS, DEFAULT_TX_FACTORY_CLASS_NAME); }
public String getExtensionCorrelationFilters() { return getProperty(PROP_EXTENSION_CORRELATION_FILTERS); } }
public String getConnectorName() { return getProperty(OdeConfigProperties.PROP_CONNECTOR_NAME, "ode"); }
public String getDbInternalUserName() { return getProperty(PROP_DB_INTERNAL_USER); }