You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2008/05/23 00:56:33 UTC
svn commit: r659298 - in /ode/trunk:
bpel-api/src/main/java/org/apche/ode/bpel/evar/
bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/
bpel-test/src/test/java/org/apache/ode/test/ bpel-test/src/test/resources/
bpel-test/src/test/resources/bpe...
Author: boisvert
Date: Thu May 22 15:56:32 2008
New Revision: 659298
URL: http://svn.apache.org/viewvc?rev=659298&view=rev
Log:
ODE-291: External variable fails when using sequence generator in keys
Added:
ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/
ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.bpel
ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.wsdl
ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/deploy.xml
ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/test.properties
Modified:
ode/trunk/bpel-api/src/main/java/org/apche/ode/bpel/evar/IncompleteKeyException.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExternalVariableTest.java
ode/trunk/bpel-test/src/test/resources/log4j.properties
Modified: ode/trunk/bpel-api/src/main/java/org/apche/ode/bpel/evar/IncompleteKeyException.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apche/ode/bpel/evar/IncompleteKeyException.java?rev=659298&r1=659297&r2=659298&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apche/ode/bpel/evar/IncompleteKeyException.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apche/ode/bpel/evar/IncompleteKeyException.java Thu May 22 15:56:32 2008
@@ -14,7 +14,7 @@
private Collection<String>_missing;
public IncompleteKeyException(Collection<String> missing) {
- super("Attempt to read external variable with an incomplete compoung key. " +
+ super("Attempt to read external variable with an incomplete compound key. " +
"The following components were missing: " + missing);
_missing = missing;
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java?rev=659298&r1=659297&r2=659298&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java Thu May 22 15:56:32 2008
@@ -152,8 +152,7 @@
boolean first = true;
for (Column c : _columns) {
// Don't ever update keys or sequences or create time stamps
- if (c.genType == GenType.sequence || c.key
- || c.genType == GenType.ctimestamp)
+ if (c.genType == GenType.sequence || c.key || c.genType == GenType.ctimestamp)
continue;
if (!first)
@@ -257,10 +256,11 @@
Document doc = parent.getOwnerDocument();
Element cel = doc.createElementNS(varType.getNamespaceURI(), c.name);
String strdat = c.toText(data);
- if (strdat != null)
+ if (strdat != null) {
cel.appendChild(doc.createTextNode(strdat));
- else if (c.nullok)
+ } else if (c.nullok || c.isGenerated()) {
cel.setAttributeNS(XSI_NS, "xsi:nil", "true");
+ }
parent.appendChild(cel);
}
@@ -463,6 +463,14 @@
+ name + "\" !", ex);
}
}
+
+ public boolean isGenerated() {
+ return (genType != null && !genType.equals(GenType.none));
+ }
+
+ public boolean isDatabaseGenerated() {
+ return isGenerated() && (genType.equals(GenType.sequence) || genType.equals(GenType.expression));
+ }
public String toString() {
return "Column {idx="+idx
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java?rev=659298&r1=659297&r2=659298&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java Thu May 22 15:56:32 2008
@@ -37,6 +37,7 @@
import org.apache.ode.bpel.extvar.jdbc.DbExternalVariable.RowKey;
import org.apache.ode.bpel.extvar.jdbc.DbExternalVariable.RowVal;
import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.ObjectPrinter;
import org.apche.ode.bpel.evar.ExternalVariableModule;
import org.apche.ode.bpel.evar.ExternalVariableModuleException;
import org.apche.ode.bpel.evar.IncompleteKeyException;
@@ -245,7 +246,7 @@
if (__log.isDebugEnabled())
__log.debug("JdbcExternalVariable.writeValue() RowKey: " + key + " RowVal: " + val);
- if (key.isComplete() && evar._initType == InitType.delete_insert) {
+ if (!key.missingValues() && evar._initType == InitType.delete_insert) {
// do delete...
throw new ExternalVariableModuleException("Delete not implemented. "); // todo
}
@@ -253,7 +254,7 @@
// should we try an update first? to do this we need to have all the required keys
// and there should be some keys
boolean tryupdatefirst = (evar._initType == InitType.update || evar._initType == InitType.update_insert)
- && !evar._keycolumns.isEmpty() && key.isComplete();
+ && !evar._keycolumns.isEmpty() && !key.missingDatabaseGeneratedValues();
boolean insert = evar._initType != InitType.update;
@@ -262,7 +263,8 @@
+ " insert: " + insert
+ " initType: " + evar._initType
+ " key.isEmpty: " + evar._keycolumns.isEmpty()
- + " key.isComplete: " + key.isComplete());
+ + " key.missingValues: " + key.missingValues()
+ + " key.missingDBValues: " + key.missingDatabaseGeneratedValues());
try {
if (tryupdatefirst)
@@ -277,7 +279,6 @@
}
return newval;
-
}
public Value readValue(QName varType, Locator locator) throws ExternalVariableModuleException {
@@ -295,7 +296,6 @@
}
return new Value(locator, val, null);
-
}
/**
@@ -340,14 +340,17 @@
} finally {
conn.close();
}
-
}
RowVal execSelect(DbExternalVariable dbev, Locator locator) throws SQLException, ExternalVariableModuleException {
RowKey rowkey = dbev.keyFromLocator(locator);
if (__log.isDebugEnabled()) __log.debug("execSelect: " + rowkey);
- if (!rowkey.isComplete()) {
+ if (rowkey.missingDatabaseGeneratedValues()) {
+ return null;
+ }
+
+ if (rowkey.missingValues()) {
throw new IncompleteKeyException(rowkey.getMissing());
}
@@ -388,10 +391,14 @@
if (__log.isDebugEnabled()) {
__log.debug("execInsert: keys=" + keys + " values=" + values);
__log.debug("Prepare statement: " + dbev.insert);
+ __log.debug("missingDatabaseGeneratedValues: " + keys.missingDatabaseGeneratedValues());
+ __log.debug("_autoColNames: " + ObjectPrinter.stringifyNvList(dbev._autoColNames));
}
- PreparedStatement stmt = dbev.generatedKeys
- ? conn.prepareStatement(dbev.insert, dbev._autoColNames)
- : conn.prepareStatement(dbev.insert);
+
+ PreparedStatement stmt = keys.missingDatabaseGeneratedValues()
+ ? conn.prepareStatement(dbev.insert, dbev._autoColNames)
+ : conn.prepareStatement(dbev.insert);
+
int idx = 1;
for (Column c : dbev._inscolumns) {
Object val = c.getValue(c.name, keys, values, locator.iid);
@@ -406,21 +413,24 @@
stmt.execute();
- if (dbev.generatedKeys) {
+ for (Column ck : keys._columns) {
+ Object val = values.get(ck.name);
+ if (__log.isDebugEnabled()) __log.debug("Key "+ck.name+": "+val);
+ keys.put(ck.name,val);
+ }
+
+ if (keys.missingDatabaseGeneratedValues() ) {
// With JDBC 3, we can get the values of the key columns (if the db supports it)
- ResultSet keyRS = stmt.getResultSet();
+ ResultSet keyRS = stmt.getGeneratedKeys();
+ if (keyRS == null)
+ throw new SQLException("Database did not return generated keys");
keyRS.next();
for (Column ck : keys._columns) {
- if (__log.isDebugEnabled()) __log.debug("Generated key "+ck.name+": "+keyRS.getObject(ck.colname));
- keys.put(ck.name, keyRS.getObject(ck.colname));
+ Object value = keyRS.getObject(ck.idx+1);
+ if (__log.isDebugEnabled()) __log.debug("Generated key "+ck.name+": "+value);
+ keys.put(ck.name, value);
}
- } else {
- for (Column ck : keys._columns) {
- Object val = values.get(ck.name);
- if (__log.isDebugEnabled()) __log.debug("Key "+ck.name+": "+val);
- keys.put(ck.name,val);
- }
- }
+ }
return keys;
} finally {
conn.close();
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java?rev=659298&r1=659297&r2=659298&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java Thu May 22 15:56:32 2008
@@ -7,9 +7,13 @@
import java.util.HashMap;
import java.util.List;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.ode.bpel.extvar.jdbc.DbExternalVariable.Column;;
class RowSubset extends ArrayList<Object> {
+ private static final Log LOG = LogFactory.getLog(RowSubset.class);
+
private static final long serialVersionUID = 1L;
protected List<Column> _columns;
@@ -28,15 +32,24 @@
}
/**
- * Return <code>true</code> if all entries are non-null.
- * @return
+ * Return <code>true</code> if any values are missing (e.g. null value)
*/
- boolean isComplete() {
- for (Object o : this)
- if (o == null)
- return false;
-
- return true;
+ boolean missingValues() {
+ for (Column c : _columns) {
+ if (get(c.idx) == null) return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return <code>true</code> if any database-generated values are missing
+ */
+ boolean missingDatabaseGeneratedValues() {
+ for (Column c : _columns) {
+ Object value = get(c.idx);
+ if (c.isDatabaseGenerated() && value == null) return true;
+ }
+ return false;
}
Modified: ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExternalVariableTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExternalVariableTest.java?rev=659298&r1=659297&r2=659298&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExternalVariableTest.java (original)
+++ ode/trunk/bpel-test/src/test/java/org/apache/ode/test/ExternalVariableTest.java Thu May 22 15:56:32 2008
@@ -1,13 +1,14 @@
package org.apache.ode.test;
import java.sql.Connection;
+import java.sql.SQLException;
import java.sql.Statement;
+import javax.sql.DataSource;
import javax.xml.namespace.QName;
+import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource;
import org.apache.ode.bpel.extvar.jdbc.JdbcExternalVariableModule;
-import org.apache.ode.utils.GUID;
-import org.hsqldb.jdbc.jdbcDataSource;
import org.junit.Test;
/**
@@ -17,13 +18,15 @@
private JdbcExternalVariableModule _jdbcext;
- private jdbcDataSource _ds;
+ private DataSource _ds;
public void setUp() throws Exception {
super.setUp();
- _ds = new org.hsqldb.jdbc.jdbcDataSource();
- _ds.setDatabase("jdbc:hsqldb:mem:" + new GUID().toString());
- _ds.setUser("sa");
+
+ EmbeddedConnectionPoolDataSource ds = new EmbeddedConnectionPoolDataSource();
+ ds.setCreateDatabase("create");
+ ds.setDatabaseName("ExternalVariableTest");
+ _ds = ds;
_jdbcext = new JdbcExternalVariableModule();
_jdbcext.registerDataSource("testds", _ds);
@@ -31,21 +34,36 @@
Connection conn = _ds.getConnection();
Statement s = conn.createStatement();
- s.execute("create table extvartable1 (" + "id1 VARCHAR PRIMARY KEY," + "_id2_ VARCHAR," + "pid VARCHAR, " + "iid INT,"
- + "cts DATETIME," + "uts DATETIME," + "foo VARCHAR," + "bar VARCHAR );");
+
+ dropTable(s, "extvartable1");
+ s.execute("create table extvartable1 (" + "id1 VARCHAR(200) PRIMARY KEY," + " \"_id2_\" VARCHAR(200)," + "pid VARCHAR(250), " + "iid INT,"
+ + "cts TIMESTAMP," + "uts TIMESTAMP," + "foo VARCHAR(250)," + "bar VARCHAR(250))");
s.execute("insert into extvartable1(id1,pid,foo) values ('123','"
+ new QName("http://ode/bpel/unit-test","HelloWorld2-1").toString()
- + "','thefoo');");
+ + "','thefoo')");
+ dropTable(s, "costPerCustomer");
s.execute("CREATE TABLE costPerCustomer (value0 varchar(250), key1 varchar(250) primary key)");
+ dropTable(s, "DataTypesTest");
s.execute("CREATE TABLE DataTypesTest (KEYSTRING VARCHAR(255), STRINGCOL VARCHAR(255), FLOATCOL FLOAT, "
- + "INTCOL INTEGER, NUMBERCOL NUMERIC, TIMESTAMPCOL TIMESTAMP, BOOLEANCOL TINYINT)");
-
+ + "INTCOL INTEGER, NUMBERCOL NUMERIC, TIMESTAMPCOL TIMESTAMP, BOOLEANCOL SMALLINT)");
+
+ dropTable(s, "GenKey");
+ s.execute("CREATE TABLE GenKey (KEYSTRING INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY, STRINGCOL VARCHAR(255))");
+
conn.close();
}
-
+
+ private static void dropTable(Statement s, String name) {
+ try {
+ s.execute("drop table "+name);
+ } catch (SQLException e) {
+ // ignore
+ }
+ }
+
@Test
public void testHelloWorld2() throws Throwable {
go("/bpel/2.0/ExtVar");
@@ -60,4 +78,9 @@
public void testExtVar3() throws Throwable {
go("/bpel/2.0/ExtVar3");
}
+
+ @Test
+ public void testExtVarKeyGen() throws Throwable {
+ go("/bpel/2.0/ExtVar-GenKey");
+ }
}
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.bpel?rev=659298&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.bpel (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.bpel Thu May 22 15:56:32 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpel:process name="ExtVar-GenKey" targetNamespace="http://example.com/process/ExtVar/GenKey"
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns:this="http://example.com/process/ExtVar/GenKey"
+ xmlns:xvar="http://ode.apache.org/externalVariables"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" >
+
+ <bpel:import namespace="http://example.com/process/ExtVar/GenKey" location="ExtVar-GenKey.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+ <bpel:partnerLinks>
+ <bpel:partnerLink name="client" partnerLinkType="this:TestPLT" myRole="process"/>
+ </bpel:partnerLinks>
+
+ <bpel:variables>
+ <bpel:variable name="StartRequest" messageType="this:StartRequest"/>
+ <bpel:variable name="keys" element="this:keys"/>
+ <bpel:variable name="extvar" element="this:extvar" xvar:id="extvar" xvar:relates-to="keys"/>
+ </bpel:variables>
+
+ <bpel:sequence>
+ <bpel:receive partnerLink="client"
+ portType="this:Test"
+ operation="Start"
+ variable="StartRequest"
+ createInstance="yes" />
+ <bpel:assign name="init-variables-GenKey">
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal><this:keys><this:keyString/></this:keys></bpel:literal>
+ </bpel:from>
+ <bpel:to>$keys</bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from>'foo'</bpel:from>
+ <bpel:to>$extvar/this:stringCol</bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+
+ <!-- Build response -->
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal><this:StartRequest><this:keyString/><this:stringCol/></this:StartRequest></bpel:literal>
+ </bpel:from>
+ <bpel:to>$StartRequest.body</bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>$keys/this:keyString</bpel:from>
+ <bpel:to>$StartRequest.body/this:keyString</bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>$extvar/this:stringCol</bpel:from>
+ <bpel:to>$StartRequest.body/this:stringCol</bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+
+ <bpel:reply partnerLink="client"
+ portType="this:Test"
+ operation="Start"
+ variable="StartRequest" />
+ </bpel:sequence>
+</bpel:process>
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.wsdl?rev=659298&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.wsdl (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/ExtVar-GenKey.wsdl Thu May 22 15:56:32 2008
@@ -0,0 +1,51 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:pnlk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns:this="http://example.com/process/ExtVar/GenKey"
+ targetNamespace="http://example.com/process/ExtVar/GenKey">
+
+ <pnlk:partnerLinkType name="TestPLT">
+ <pnlk:role name="process" portType="this:Test"/>
+ </pnlk:partnerLinkType>
+
+ <wsdl:types>
+ <xs:schema elementFormDefault="qualified" targetNamespace="http://example.com/process/ExtVar/GenKey">
+ <xs:element name="StartRequest" type="xs:string"/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="StartRequest">
+ <wsdl:part name="body" element="this:StartRequest"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Test">
+ <wsdl:operation name="Start">
+ <wsdl:input message="this:StartRequest" name="StartRequest"/>
+ <wsdl:output message="this:StartRequest"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="TestBinding" type="this:Test">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="Start">
+ <soap:operation style="document" soapAction="http://example.com/process/ExtVar/GenKey"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="TestService">
+ <wsdl:port name="TestPort" binding="this:TestBinding">
+ <soap:address location="http://localhost:8080/ode/processes/ExtVar/GenKey"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/deploy.xml?rev=659298&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/deploy.xml (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/deploy.xml Thu May 22 15:56:32 2008
@@ -0,0 +1,24 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<dd:deploy xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd">
+
+ <dd:process xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:this="http://example.com/process/ExtVar/GenKey"
+ name="this:ExtVar-GenKey">
+
+ <xvar:externalVariable xmlns:xvar="http://ode.apache.org/externalVariables" id="extvar">
+ <xjdbc:jdbc xmlns:xjdbc="http://ode.apache.org/externalVariables/jdbc">
+ <xjdbc:datasource-ref>testds</xjdbc:datasource-ref>
+ <xjdbc:table>GenKey</xjdbc:table>
+ <xjdbc:column name="keyString" key="yes" sql-type="INTEGER" xsd-type="xs:string" generator="sequence"/>
+ <xjdbc:column name="stringCol" key="no" sql-type="VARCHAR" xsd-type="xs:string" />
+ <xjdbc:init mode="update-insert" />
+ </xjdbc:jdbc>
+ </xvar:externalVariable>
+
+ <dd:provide partnerLink="client">
+ <dd:service name="this:TestService" port="TestPort" />
+ </dd:provide>
+ </dd:process>
+
+</dd:deploy>
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/test.properties
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/test.properties?rev=659298&view=auto
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/test.properties (added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/ExtVar-GenKey/test.properties Thu May 22 15:56:32 2008
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+namespace=http://example.com/process/ExtVar/GenKey
+service=TestService
+operation=Start
+request1=<message><body><tns:StartRequest xmlns:tns="http://example.com/process/ExtVar/GenKey">foo</tns:StartRequest></body></message>
+response1=.*><keyString>1</keyString><stringCol>foo</stringCol>.*
+
Modified: ode/trunk/bpel-test/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/log4j.properties?rev=659298&r1=659297&r2=659298&view=diff
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/log4j.properties (original)
+++ ode/trunk/bpel-test/src/test/resources/log4j.properties Thu May 22 15:56:32 2008
@@ -1,22 +1,22 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
# Set root logger level to WARN and its only appender to CONSOLE
-log4j.rootLogger=WARN, CONSOLE
+log4j.rootLogger=WARN, CONSOLE, FILE
# log4j properties to work with commandline tools.
log4j.category.org.mortbay=ERROR
@@ -24,10 +24,19 @@
log4j.category.org.objectweb=ERROR
log4j.category.org.apache.ode.axis2=DEBUG
log4j.category.org.apache.ode.bpel.engine=DEBUG
-log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=DEBUG
log4j.category.org.apache.ode.bpel.epr=INFO
+log4j.category.org.apache.ode.bpel.extvar.jdbc=DEBUG
+log4j.category.org.apache.ode.bpel.runtime=DEBUG
+log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=DEBUG
# Console appender
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n
+
+log4j.appender.FILE=org.apache.log4j.FileAppender
+log4j.appender.FILE.File=bpel-test.log
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.ConversionPattern=%d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - %m%n
+log4j.appender.FILE.append=false
+