Author: jeff.yuchang
Date: 2010-09-01 07:41:53 -0400 (Wed, 01 Sep 2010)
New Revision: 931
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
Log:
* fixed the compliation error for updated simple scheduler API changes.
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-09-01
10:19:22 UTC (rev 930)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-09-01
11:41:53 UTC (rev 931)
@@ -29,10 +29,10 @@
import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
import org.apache.ode.dao.bpel.BpelDAOConnectionFactory;
+import org.apache.ode.dao.scheduler.SchedulerDAOConnectionFactory;
import org.apache.ode.dao.store.ConfStoreDAOConnectionFactory;
import org.apache.ode.il.config.OdeConfigProperties;
import org.apache.ode.il.dbutil.Database;
-import org.apache.ode.scheduler.simple.JdbcDelegate;
import org.apache.ode.scheduler.simple.SimpleScheduler;
import org.apache.ode.store.ProcessStoreImpl;
import org.apache.ode.store.RiftSawProcessStore;
@@ -67,6 +67,7 @@
protected TransactionManager _txMgr;
protected BpelDAOConnectionFactory _daoCF;
protected ConfStoreDAOConnectionFactory _storeCF;
+ protected SchedulerDAOConnectionFactory _schedulerDaoCF;
protected Scheduler _scheduler;
protected Database _db;
protected ExecutorService _executorService;
@@ -375,6 +376,15 @@
} finally {
_storeCF = null;
}
+
+ if (_schedulerDaoCF != null)
+ try {
+ _schedulerDaoCF.shutdown();
+ } catch (Throwable ex) {
+ __log.debug("Scheduler DAO shutdown failed.", ex);
+ } finally {
+ _schedulerDaoCF = null;
+ }
if (_db != null)
try {
@@ -431,12 +441,15 @@
}
protected void initDAO() throws Exception {
- __log.debug("USING DAO: "+_odeConfig.getDAOConnectionFactory());
+ __log.debug("USING DAO: "+_odeConfig.getDAOConnectionFactory() + ",
" + _odeConfig.getDAOConfStoreConnectionFactory()
+ + ", " + _odeConfig.getDAOConfScheduleConnectionFactory());
try {
_daoCF = _db.createDaoCF();
_storeCF = _db.createDaoStoreCF();
+ _schedulerDaoCF = _db.createDaoSchedulerCF();
} catch (Exception ex) {
- String errmsg = "DAO INSTANTIATION FAILED:
"+_odeConfig.getDAOConnectionFactory() + " and " +
_odeConfig.getDAOConfStoreConnectionFactory();
+ String errmsg = "DAO INSTANTIATION FAILED:
"+_odeConfig.getDAOConnectionFactory() + " , " +
_odeConfig.getDAOConfStoreConnectionFactory()
+ + " and " + _odeConfig.getDAOConfScheduleConnectionFactory();
__log.error(errmsg, ex);
throw new Exception(errmsg, ex);
@@ -453,7 +466,7 @@
}
protected Scheduler createScheduler() {
- SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(),new
JdbcDelegate(_db.getDataSource()), _odeConfig.getProperties());
+ SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(),
_schedulerDaoCF, _txMgr, _odeConfig.getProperties());
scheduler.setExecutorService(_executorService);
scheduler.setTransactionManager(_txMgr);
Show replies by date