Author: jeff.yuchang
Date: 2010-05-25 13:27:34 -0400 (Tue, 25 May 2010)
New Revision: 666
Modified:
branches/ODE/ODE-1.x-jpa/bpel-runtime/pom.xml
branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableEngineTest.java
branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/resources/log4j.properties
Log:
* fix the failed test case.
Modified: branches/ODE/ODE-1.x-jpa/bpel-runtime/pom.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/bpel-runtime/pom.xml 2010-05-25 17:08:23 UTC (rev 665)
+++ branches/ODE/ODE-1.x-jpa/bpel-runtime/pom.xml 2010-05-25 17:27:34 UTC (rev 666)
@@ -81,6 +81,16 @@
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-dao-jpa-ojpa</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-dao-jpa-hibernate</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-dao-hibernate</artifactId>
<scope>test</scope>
</dependency>
Modified:
branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableEngineTest.java
===================================================================
---
branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableEngineTest.java 2010-05-25
17:08:23 UTC (rev 665)
+++
branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableEngineTest.java 2010-05-25
17:27:34 UTC (rev 666)
@@ -21,6 +21,7 @@
import java.sql.Connection;
import java.sql.Statement;
import java.util.ArrayList;
+import java.util.Properties;
import javax.xml.namespace.QName;
@@ -28,11 +29,11 @@
import org.apache.ode.bpel.engine.extvar.ExternalVariableConf;
import org.apache.ode.bpel.engine.extvar.ExternalVariableConf.Variable;
-import org.apache.ode.utils.DOMUtils;
-import org.apache.ode.utils.GUID;
import org.apache.ode.bpel.evar.ExternalVariableModule.Locator;
import org.apache.ode.bpel.evar.ExternalVariableModule.Value;
-import org.hsqldb.jdbc.jdbcDataSource;
+import org.apache.ode.il.config.OdeConfigProperties;
+import org.apache.ode.il.dbutil.Database;
+import org.apache.ode.utils.DOMUtils;
import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -54,16 +55,17 @@
final QName _varType = new QName("foo", "foobar");
ExternalVariableConf _econf;
- jdbcDataSource _ds;
+ Database _db;
JdbcExternalVariableModule _engine;
Element _el1;
public void setUp() throws Exception {
- _ds = new org.hsqldb.jdbc.jdbcDataSource();
- _ds.setDatabase("jdbc:hsqldb:mem:" + new GUID().toString());
- _ds.setUser("sa");
+
+ OdeConfigProperties props = new OdeConfigProperties(new Properties(),"");
+ _db = new Database(props);
+ _db.start();
- Connection conn = _ds.getConnection();
+ Connection conn = _db.getDataSource().getConnection();
Statement s = conn.createStatement();
s.execute("create table extvartable1 (" +
"id1 VARCHAR PRIMARY KEY," +
@@ -76,11 +78,15 @@
"bar VARCHAR );");
_engine = new JdbcExternalVariableModule();
- _engine.registerDataSource("testds",_ds);
+ _engine.registerDataSource("testds",_db.getDataSource());
_el1=DOMUtils.stringToDOM("<foobar><id2>ignored</id2><foo>foo</foo><bar>bar</bar></foobar>");
}
+ protected void tearDown() throws Exception {
+ _db.shutdown();
+ }
+
@Test
public void testConfigurationParsing() throws Exception {
Document deploydoc =
DOMUtils.parse(getClass().getResourceAsStream("evardeploy.xml"));
Modified: branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/resources/log4j.properties
===================================================================
--- branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/resources/log4j.properties 2010-05-25
17:08:23 UTC (rev 665)
+++ branches/ODE/ODE-1.x-jpa/bpel-runtime/src/test/resources/log4j.properties 2010-05-25
17:27:34 UTC (rev 666)
@@ -33,5 +33,8 @@
log4j.category.org.apache.ode.bpel=INFO
log4j.category.org.apache.ode.jacob=INFO
log4j.category.org.apache.ode.store=INFO
-log4j.category.org.apache.ode.daohib=INFO
+log4j.category.org.apache.ode.dao=INFO
log4j.category.org.apache.ode.utils=INFO
+log4j.category.openjpa=INFO
+log4j.category.org.apache.ode.sql=INFO
+log4j.category.org.apache.ode.il=INFO