From ce1eecbb3f5e58338b4cbfb16e8b2d37f41e8a87 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 16 Mar 2009 08:46:40 +0000 Subject: Delete some old RC tags git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@754846 13f79535-47bb-0310-9956-ffa450edef68 --- .../bpel/BPELDocumentProcessorTestCase.java | 67 ----------- .../bpel/BPELHelloWorldTestCase.java | 59 ---------- .../bpel/BPELImplementationProcessorTestCase.java | 122 -------------------- .../bpel/EmbeddedODEServerTestCase.java | 128 --------------------- .../src/test/resources/deploy.xml | 30 ----- .../src/test/resources/helloworld.bpel | 66 ----------- .../src/test/resources/helloworld.componentType | 30 ----- .../src/test/resources/helloworld.composite | 29 ----- .../src/test/resources/helloworld.wsdl | 82 ------------- .../src/test/resources/log4j.properties | 33 ------ 10 files changed, 646 deletions(-) delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/deploy.xml delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.bpel delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.componentType delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.composite delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.wsdl delete mode 100644 tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/log4j.properties (limited to 'tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test') diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java deleted file mode 100644 index 32261375ef..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.net.URI; -import java.net.URL; - -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; -import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor; -import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory; - -/** - * @version $Rev$ $Date$ - */ -public class BPELDocumentProcessorTestCase extends TestCase { - - protected static final String BPEL_PROCESS_FILE = "helloworld.bpel"; - - private ModelFactoryExtensionPoint modelFactories; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - modelFactories = new DefaultModelFactoryExtensionPoint(); - modelFactories.addFactory(new DefaultAssemblyFactory()); - modelFactories.addFactory(new DefaultWSDLFactory()); - - BPELFactory bpelFactory = new DefaultBPELFactory(modelFactories); - modelFactories.addFactory(bpelFactory); - } - - public void testLoadBPELProcessDefinition() throws Exception { - BPELDocumentProcessor bpelDocumentProcessor = new BPELDocumentProcessor(modelFactories); - - URI processURI = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE).toURI(); - URL processLocation = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE); - BPELProcessDefinition bpelProcessDefinition = bpelDocumentProcessor.read(null, processURI, processLocation); - - assertNotNull(bpelProcessDefinition); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), bpelProcessDefinition.getName()); - assertEquals(processLocation, bpelProcessDefinition.getLocation()); - } -} diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java deleted file mode 100644 index 24750ef07a..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELHelloWorldTestCase extends TestCase { - - private SCADomain scaDomain; - HelloPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("helloworld.composite"); - bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testInvoke() { - String response = bpelService.hello("Hello"); - assertEquals("World", response); - } -} diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java deleted file mode 100644 index b52a75012f..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.io.StringReader; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamReader; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; -import org.apache.tuscany.sca.assembly.xml.Constants; -import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationProcessor; -import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; - -/** - * @version $Rev$ $Date$ - */ -public class BPELImplementationProcessorTestCase extends TestCase { - - protected static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel"); - - private static final String COMPOSITE = - "" - + "" - + " " - + " " - + ""; - - private static final String COMPOSITE_INVALID = - "" - + "" - + " " - + " " - + ""; - - private XMLInputFactory xmlFactory; - private ModelFactoryExtensionPoint modelFactories; - - @Override - protected void setUp() throws Exception { - super.setUp(); - xmlFactory = XMLInputFactory.newInstance(); - - modelFactories = new DefaultModelFactoryExtensionPoint(); - AssemblyFactory assemblyFactory = new DefaultAssemblyFactory(); - modelFactories.addFactory(assemblyFactory); - JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(); - modelFactories.addFactory(javaFactory); - } - - /** - * Test parsing valid composite definition. Valid coposite populated with correct values expected. - * @throws Exception - */ - public void testLoadValidComposite() throws Exception { - XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(COMPOSITE)); - - BPELImplementationProcessor bpelProcessor = new BPELImplementationProcessor(modelFactories); - - while(true) { - int event = reader.next(); - if(event == XMLStreamConstants.START_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) { - break; - } - } - - BPELImplementation implementation = bpelProcessor.read(reader); - - assertNotNull(implementation); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), implementation.getProcess()); - } - - /** - * Test parsing invalid composite definition. Exception should be thrown - * @throws Exception - */ - public void testLoadInvalidComposite() throws Exception { - XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(COMPOSITE_INVALID)); - - BPELImplementationProcessor bpelProcessor = new BPELImplementationProcessor(modelFactories); - - while(true) { - int event = reader.next(); - if(event == XMLStreamConstants.START_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) { - break; - } - } - - try { - bpelProcessor.read(reader); - - fail("InvalidException should have been thrown"); - } catch(Exception e) { - assertTrue(true); - } - } -} diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java deleted file mode 100644 index 5cf8586fe0..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.io.File; -import java.net.URL; -import java.util.concurrent.Future; - -import javax.transaction.TransactionManager; -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.ode.bpel.iapi.Message; -import org.apache.ode.bpel.iapi.MyRoleMessageExchange; -import org.apache.ode.bpel.iapi.MessageExchange.Status; -import org.apache.ode.utils.DOMUtils; -import org.apache.ode.utils.GUID; -import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer; -import org.apache.tuscany.sca.implementation.bpel.ode.GeronimoTxFactory; -import org.apache.tuscany.sca.implementation.bpel.ode.ODEDeployment; -import org.w3c.dom.Element; - -/** - * Test to Deploy and Invoke a HelloWorld BPEL process using EmbeddedODEServer - * - * @version $Rev$ $Date$ - */ -public class EmbeddedODEServerTestCase extends TestCase { - - private EmbeddedODEServer odeServer; - - private TransactionManager txMgr; - - @Override - protected void setUp() throws Exception { - GeronimoTxFactory txFactory = new GeronimoTxFactory(); - txMgr = txFactory.getTransactionManager(); - - this.odeServer = new EmbeddedODEServer(txMgr); - odeServer.init(); - } - - @Override - protected void tearDown() throws Exception { - odeServer.stop(); - } - - public void testProcessInvocation() throws Exception { - if (!odeServer.isInitialized()) { - fail("Server did not start !"); - } - - URL deployURL = getClass().getClassLoader().getResource("deploy.xml"); - File deploymentDir = new File(deployURL.toURI().getPath()).getParentFile(); - System.out.println("Deploying : " + deploymentDir.toString()); - System.out.println(deploymentDir); - if (odeServer.isInitialized()) { - try { - txMgr.begin(); - odeServer.deploy(new ODEDeployment(deploymentDir)); - txMgr.commit(); - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - - // transaction one - MyRoleMessageExchange mex = null; - Future onhold = null; - try { - // invoke the process - txMgr.begin(); - mex = odeServer.getBpelServer().getEngine().createMessageExchange(new GUID().toString(), - new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl", "HelloService"), "hello"); - - Message request = mex.createMessage(new QName("", "")); - request.setMessage(DOMUtils.stringToDOM("Hello")); - onhold = mex.invoke(request); - txMgr.commit(); - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - // - end of transaction one - - // Waiting until the reply is ready in case the engine needs to continue in a different thread - if (onhold != null) - onhold.get(); - - // transaction two - try { - txMgr.begin(); - // Reloading the mex in the current transaction, otherwise we can't be sure we have - // the "freshest" one. - mex = (MyRoleMessageExchange) odeServer.getBpelServer().getEngine().getMessageExchange(mex.getMessageExchangeId()); - - Status status = mex.getStatus(); - System.out.println("Status: " + status.name()); - Element response = mex.getResponse().getMessage(); - System.out.println("Response: " + DOMUtils.domToString(response)); - txMgr.commit(); - // end of transaction two - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - } - } - -} diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/deploy.xml b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/deploy.xml deleted file mode 100644 index 571aa37d58..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/deploy.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - true - - - - - diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.bpel b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.bpel deleted file mode 100644 index e983899d76..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.componentType b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.componentType deleted file mode 100644 index 121064a475..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.composite b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.composite deleted file mode 100644 index 569328b2ae..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.wsdl b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.wsdl deleted file mode 100644 index 1cb338b283..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/log4j.properties b/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/log4j.properties deleted file mode 100644 index 03d99cea4f..0000000000 --- a/tags/java/sca/1.0-RC1b/modules/implementation-bpel/src/test/resources/log4j.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# 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 properties to work with commandline tools. -log4j.category.org.mortbay=ERROR -log4j.category.org.hibernate.type=WARN -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 - -# 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 -- cgit v1.2.3