You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by rr...@apache.org on 2009/07/27 23:17:28 UTC
svn commit: r798284 - in /ode/branches/APACHE_ODE_1.X: ./
jbi/src/test/java/org/apache/ode/jbi/ jbi/src/test/resources/ExtVarJbiTest/
jbi/src/test/resources/HelloWorldJbiTest/
Author: rr
Date: Mon Jul 27 21:17:28 2009
New Revision: 798284
URL: http://svn.apache.org/viewvc?rev=798284&view=rev
Log:
ODE-501: ExtVar JBI test
Added:
ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/ExtVarJbiTest.java (with props)
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/ExtVar.xsd (with props)
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.bpel
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.wsdl (with props)
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/deploy.xml (with props)
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/smx.xml (with props)
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/test.properties (with props)
Modified:
ode/branches/APACHE_ODE_1.X/Rakefile
ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java
ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/HelloWorldJbiTest/smx.xml
Modified: ode/branches/APACHE_ODE_1.X/Rakefile
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/Rakefile?rev=798284&r1=798283&r2=798284&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/Rakefile (original)
+++ ode/branches/APACHE_ODE_1.X/Rakefile Mon Jul 27 21:17:28 2009
@@ -117,7 +117,8 @@
"org.objectweb.howl:howl:jar:1.0.1-1",
"org.apache.activemq:activemq-core:jar:4.1.1",
"org.apache.activemq:activemq-ra:jar:4.1.1",
- "commons-beanutils:commons-beanutils:jar:1.7.0"
+ "commons-beanutils:commons-beanutils:jar:1.7.0",
+ "tranql:tranql-connector-derby-common:jar:1.1"
]
SPRING = ["org.springframework:spring:jar:2.5.6"]
TRANQL = [ "tranql:tranql-connector:jar:1.1", "axion:axion:jar:1.0-M3-dev", COMMONS.primitives ]
@@ -516,6 +517,7 @@
jbi.include path_to("src/main/jbi/ode-jbi.properties")
end
+ test.using :properties=>{ "java.naming.factory.initial" => "org.apache.xbean.spring.jndi.SpringInitialContextFactory"}
test.with projects("dao-jpa", "dao-hibernate", "bpel-compiler", "bpel-api-jca", "jca-ra",
"jca-server", "jacob"),
BACKPORT, COMMONS.lang, COMMONS.collections, DERBY, GERONIMO.connector, GERONIMO.kernel,
Added: ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/ExtVarJbiTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/ExtVarJbiTest.java?rev=798284&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/ExtVarJbiTest.java (added)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/ExtVarJbiTest.java Mon Jul 27 21:17:28 2009
@@ -0,0 +1,43 @@
+package org.apache.ode.jbi;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
+import javax.xml.namespace.QName;
+
+public class ExtVarJbiTest extends JbiTestBase {
+ private void initDb() throws Exception {
+ TransactionManager tm = (TransactionManager) getBean("transactionManager");
+ tm.begin();
+ Connection conn = ((DataSource) getBean("localDerbyDataSource")).getConnection();
+
+ dropTable(conn, "extvartable1");
+ Statement s = conn.createStatement();
+ s.execute("create table extvartable1 (" + "id1 VARCHAR(200) PRIMARY KEY," + " \"_id2_\" VARCHAR(200)," + "pid2 VARCHAR(250), " + "iid INT,"
+ + "cts TIMESTAMP," + "uts TIMESTAMP," + "foo VARCHAR(250)," + "bar VARCHAR(250))");
+
+ s.execute("insert into extvartable1(id1,pid2,foo) values ('123','"
+ + new QName("http://ode/bpel/unit-test","HelloWorld2-1").toString()
+ + "','thefoo')");
+ s.close();
+ tm.commit();
+ }
+
+ private static void dropTable(Connection c, String name) {
+ try {
+ Statement s = c.createStatement();
+ s.execute("drop table "+name);
+ s.close();
+ } catch (SQLException e) {
+ // ignore
+ }
+ }
+
+ public void testExtVar() throws Exception {
+ initDb();
+ go();
+ }
+}
Propchange: ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/ExtVarJbiTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java?rev=798284&r1=798283&r2=798284&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java (original)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java Mon Jul 27 21:17:28 2009
@@ -16,6 +16,7 @@
*/
package org.apache.ode.jbi;
+import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.InputStream;
@@ -26,23 +27,31 @@
import java.util.Properties;
import java.util.regex.Pattern;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOut;
+import javax.xml.namespace.QName;
+import javax.xml.transform.stream.StreamSource;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.servicemix.components.util.EchoComponent;
-import org.apache.servicemix.http.HttpComponent;
+import org.apache.servicemix.client.DefaultServiceMixClient;
import org.apache.servicemix.jbi.container.ActivationSpec;
import org.apache.servicemix.jbi.container.JBIContainer;
import org.apache.servicemix.jbi.framework.ComponentContextImpl;
import org.apache.servicemix.jbi.framework.ComponentNameSpace;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
import org.apache.servicemix.jbi.util.FileUtil;
import org.apache.servicemix.tck.SpringTestSupport;
import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.junit.Ignore;
import org.springframework.context.support.AbstractXmlApplicationContext;
+@Ignore
public class JbiTestBase extends SpringTestSupport {
private static Log log = LogFactory.getLog(JbiTestBase.class);
- private OdeComponent odeComponent;
+ protected OdeComponent odeComponent;
+ protected JBIContainer jbiContainer;
protected Properties testProperties;
@@ -55,9 +64,9 @@
protected void setUp() throws Exception {
super.setUp();
- JBIContainer jbiContainer = ((JBIContainer) getBean("jbi"));
+ jbiContainer = ((JBIContainer) getBean("jbi"));
odeComponent = new OdeComponent();
-
+
ComponentContextImpl cc = new ComponentContextImpl(jbiContainer, new ComponentNameSpace(jbiContainer.getName(), "ODE"));
ActivationSpec activationSpec = new ActivationSpec();
activationSpec.setComponent(odeComponent);
@@ -96,27 +105,43 @@
String request = testProperties.getProperty("request");
String expectedResponse = testProperties.getProperty("response");
- String httpUrl = testProperties.getProperty("http.url", "");
- if (!httpUrl.equals("")) {
- log.debug(getTestName() + " sending http request to " + httpUrl + " request: " + request);
- URLConnection connection = new URL(httpUrl).openConnection();
- connection.setDoOutput(true);
- connection.setDoInput(true);
- //Send request
- OutputStream os = connection.getOutputStream();
- PrintWriter wt = new PrintWriter(os);
- wt.print(request);
- wt.flush();
- wt.close();
- // Read the response.
- InputStream is = connection.getInputStream();
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- FileUtil.copyInputStream(is, baos);
- String result = baos.toString();
- log.debug(getTestName() + " have result: " + result);
- matchResponse(expectedResponse, result);
+ {
+ String httpUrl = testProperties.getProperty("http.url");
+ if (httpUrl != null) {
+ log.debug(getTestName() + " sending http request to " + httpUrl + " request: " + request);
+ URLConnection connection = new URL(httpUrl).openConnection();
+ connection.setDoOutput(true);
+ connection.setDoInput(true);
+ //Send request
+ OutputStream os = connection.getOutputStream();
+ PrintWriter wt = new PrintWriter(os);
+ wt.print(request);
+ wt.flush();
+ wt.close();
+ // Read the response.
+ InputStream is = connection.getInputStream();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ FileUtil.copyInputStream(is, baos);
+ String result = baos.toString();
+ log.debug(getTestName() + " have result: " + result);
+ matchResponse(expectedResponse, result);
+ }
}
-
+ {
+ if (testProperties.getProperty("nmr.service") != null) {
+ DefaultServiceMixClient client = new DefaultServiceMixClient(jbiContainer);
+ InOut io = client.createInOutExchange();
+ io.setService(QName.valueOf(testProperties.getProperty("nmr.service")));
+ io.setOperation(QName.valueOf(testProperties.getProperty("nmr.operation")));
+ io.getInMessage().setContent(new StreamSource(new ByteArrayInputStream(request.getBytes())));
+ client.sendSync(io,20000);
+ assertEquals(ExchangeStatus.ACTIVE,io.getStatus());
+ assertNotNull(io.getOutMessage());
+ String result = new SourceTransformer().contentToString(io.getOutMessage());
+ matchResponse(expectedResponse, result);
+ client.done(io);
+ }
+ }
enableProcess(getTestName(), false);
}
Added: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/ExtVar.xsd
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/ExtVar.xsd?rev=798284&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/ExtVar.xsd (added)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/ExtVar.xsd Mon Jul 27 21:17:28 2009
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<schema
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://foo/extvar"
+ xmlns:tns="http://foo/extvar" elementFormDefault="qualified">
+
+ <complexType name="tRow">
+ <sequence>
+ <element name="id1" type="string"/>
+ <element name="id2" type="string"/>
+ <element name="pid" type="string"/>
+ <element name="cts" type="string"/> <!-- create time -->
+ <element name="uts" type="string"/> <!-- update time -->
+ <element name="foo" type="string"/>
+ <element name="bar" type="string"/>
+ </sequence>
+ </complexType>
+
+ <element name="row" type="tns:tRow" />
+</schema>
\ No newline at end of file
Propchange: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/ExtVar.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.bpel?rev=798284&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.bpel (added)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.bpel Mon Jul 27 21:17:28 2009
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<process name="HelloWorld2"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://ode/bpel/unit-test"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="http://ode/bpel/unit-test.wsdl"
+ xmlns:foo="http://foo/extvar"
+ 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">
+
+ <import
+ namespace="http://foo/extvar"
+ location="ExtVar.xsd"
+ importType="http://www.w3.org/2001/XMLSchema"/>
+
+ <import location="HelloWorld2.wsdl"
+ namespace="http://ode/bpel/unit-test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="test:HelloPartnerLinkType"
+ myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="myVar" messageType="test:HelloMessage"/>
+ <variable name="tmpVar" type="xsd:string"/>
+ <variable name="tmpDate" type="xsd:dateTime"/>
+ <variable name="idx" element="foo:row" />
+ <variable name="external" element="foo:row" xvar:id="evar1" xvar:relates-to="idx"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="myVar"
+ createInstance="yes"/>
+
+ <!--
+ <element name="id1" type="string"/>
+ <element name="id2" type="string"/>
+ <element name="pid" type="string"/>
+ <element name="cts" type="string"/>
+ <element name="uts" type="string"/>
+ <element name="foo" type="string"/>
+ <element name="bar" type="string"/>
+ -->
+
+ <assign>
+ <copy>
+ <from><literal><whatever><foo:pid2>{http://ode/bpel/unit-test}HelloWorld2-1</foo:pid2></whatever></literal></from>
+ <to variable="idx" />
+ </copy>
+ </assign>
+ <assign name="assign1">
+ <copy>
+ <from variable="myVar" part="TestPart"/>
+ <to variable="tmpVar"/>
+ </copy>
+ <copy>
+ <bpws:from xmlns="">concat($tmpVar, $external/foo:pid2, ' ', $external/foo:id1, ' ', $external/foo:foo)</bpws:from>
+ <to variable="myVar" part="TestPart"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="myVar"/>
+ </sequence>
+</process>
Added: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.wsdl?rev=798284&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.wsdl Mon Jul 27 21:17:28 2009
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<wsdl:definitions
+ targetNamespace="http://ode/bpel/unit-test.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ode/bpel/unit-test.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="TestPart" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ <plnk:role name="you" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
+
Propchange: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/HelloWorld2.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/deploy.xml?rev=798284&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/deploy.xml Mon Jul 27 21:17:28 2009
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+ xmlns:pns="http://ode/bpel/unit-test"
+ xmlns:wns="http://ode/bpel/unit-test.wsdl"
+ xmlns:xvar="http://ode.apache.org/externalVariables"
+ xmlns:jdbc="http://ode.apache.org/externalVariables/jdbc" >
+
+ <process name="pns:HelloWorld2">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="wns:HelloService" port="HelloPort"/>
+ </provide>
+
+ <xvar:externalVariable id="evar1" >
+ <jdbc:jdbc>
+ <jdbc:datasource-jndi>testds</jdbc:datasource-jndi>
+ <jdbc:table>extvartable1</jdbc:table>
+ <jdbc:column name="pid2" key="yes"/>
+ <jdbc:column name="id1"/>
+ <jdbc:column name="cts" generator="ctimestamp" />
+ <jdbc:column name="uts" generator="utimestamp" />
+ <jdbc:column name="foo"/>
+ </jdbc:jdbc>
+ </xvar:externalVariable>
+
+ </process>
+</deploy>
+
Propchange: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/deploy.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/smx.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/smx.xml?rev=798284&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/smx.xml (added)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/smx.xml Mon Jul 27 21:17:28 2009
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
+ xmlns:http="http://servicemix.apache.org/http/1.0"
+ xmlns:eip="http://servicemix.apache.org/eip/1.0"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:jencks="http://jencks.org/2.0"
+ >
+
+ <bean id="transactionManager" class="org.apache.geronimo.transaction.manager.GeronimoTransactionManager"/>
+
+ <jencks:connectionTracker id="connectionTracker" geronimoTransactionManager="#transactionManager" />
+
+ <jencks:workManager
+ id="workManager"
+ threadPoolSize="200"
+ transactionManager="#transactionManager" />
+
+ <jencks:bootstrapContext
+ id="bootstrapContext"
+ workManager="#workManager"
+ transactionManager="#transactionManager" />
+
+ <jencks:poolingSupport
+ id="poolingSupport"
+ connectionMaxIdleMinutes="5"
+ poolMaxSize="20"
+ />
+
+ <jencks:connectionManager
+ id="connectionManager"
+ containerManagedSecurity="false"
+ transaction="xa"
+ transactionManager="#transactionManager"
+ poolingSupport="#poolingSupport"
+ connectionTracker="#connectionTracker"
+ />
+
+ <bean id="localDerbyMCF" class="org.tranql.connector.derby.EmbeddedXAMCF">
+ <property name="databaseName" value="target/test/testdb"/>
+ <property name="createDatabase" value="true"/>
+ <property name="userName" value = "sa"/>
+ <property name="password" value = ""/>
+ </bean>
+ <bean id="localDerbyDataSource" class="org.springframework.jca.support.LocalConnectionFactoryBean">
+ <property name="managedConnectionFactory" ref="localDerbyMCF"/>
+ <property name="connectionManager" ref="connectionManager"/>
+ </bean>
+
+ <bean id="jndi"
+ class="org.apache.xbean.spring.jndi.SpringInitialContextFactory"
+ factory-method="makeInitialContext"
+ singleton="true"
+ depends-on="bootstrapContext"
+ >
+ <property name="entries" ref="jndiEntries" />
+ </bean>
+
+ <util:map id="jndiEntries">
+ <entry key="testds" value-ref="localDerbyDataSource"/>
+ </util:map>
+
+ <sm:container
+ id="jbi"
+ embedded="true"
+ rootDir="target/test/smx"
+ transactionManager="#transactionManager"
+ depends-on="jndi"
+ >
+ </sm:container>
+</beans>
Propchange: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/smx.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/test.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/test.properties?rev=798284&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/test.properties (added)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/test.properties Mon Jul 27 21:17:28 2009
@@ -0,0 +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.
+#
+
+nmr.service={http://ode/bpel/unit-test.wsdl}HelloService
+nmr.operation=hello
+request=<message><TestPart>Hello</TestPart></message>
+response=.*Hello.*HelloWorld2-1.*123.*thefoo.*
+
Propchange: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/ExtVarJbiTest/test.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/HelloWorldJbiTest/smx.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/HelloWorldJbiTest/smx.xml?rev=798284&r1=798283&r2=798284&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/HelloWorldJbiTest/smx.xml (original)
+++ ode/branches/APACHE_ODE_1.X/jbi/src/test/resources/HelloWorldJbiTest/smx.xml Mon Jul 27 21:17:28 2009
@@ -27,7 +27,7 @@
<sm:container
id="jbi"
- embedded="false"
+ embedded="true"
rootDir="target/test/smx"
transactionManager="#transactionManager"
>