summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel')
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java67
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java59
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java122
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java60
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java63
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java62
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java128
7 files changed, 0 insertions, 561 deletions
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java
deleted file mode 100644
index 6aba1f27d9..0000000000
--- a/branches/sca-java-1.1/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/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/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java
deleted file mode 100644
index 208af4ca2f..0000000000
--- a/branches/sca-java-1.1/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/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("Hello World", response);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java
deleted file mode 100644
index b52a75012f..0000000000
--- a/branches/sca-java-1.1/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 =
- "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
- + "<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:hns=\"http://tuscany.apache.org/implementation/bpel/example/helloworld\" targetNamespace=\"http://bpel\" name=\"bpel\">"
- + " <component name=\"BPELHelloWorldComponent\">"
- + " <implementation.bpel process=\"hns:HelloWorld\" />"
- + "</component>";
-
- private static final String COMPOSITE_INVALID =
- "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
- + "<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:hns=\"http://tuscany.apache.org/implementation/bpel/example/helloworld\" targetNamespace=\"http://bpel\" name=\"bpel\">"
- + " <component name=\"BPELHelloWorldComponent\">"
- + " <implementation.bpel/>"
- + "</component>";
-
- 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/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java
deleted file mode 100644
index 1ab2ba3d5d..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java
+++ /dev/null
@@ -1,60 +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.ping.PingPortType;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * Tests the BPEL service
- *
- * @version $Rev$ $Date$
- */
-public class BPELPingPongTestCase extends TestCase {
-
- private SCADomain scaDomain;
- PingPortType bpelPing = null;
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void setUp() throws Exception {
- //scaDomain = SCADomain.newInstance("ping-pong/ping-pong.composite");
- //bpelPing = scaDomain.getService(PingPortType.class, "BPELPingPong-PingComponent/PingService");
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void tearDown() throws Exception {
- //scaDomain.close();
- }
-
- public void testPing() {
- //String response = bpelPing.Ping("Ping");
- //System.out.println("response:" + response);
- //assertNotNull(response);
- // assertEquals("Hello World", response);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java
deleted file mode 100644
index 34f82318a3..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java
+++ /dev/null
@@ -1,63 +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.ping.PingPortType;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * Tests the BPEL service
- *
- * @version $Rev$ $Date$
- */
-public class BPELPingTestCase extends TestCase {
-
- private SCADomain scaDomain;
- PingPortType bpelService = null;
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void setUp() throws Exception {
- //scaDomain = SCADomain.newInstance("ping/ping.composite");
- //bpelService = scaDomain.getService(PingPortType.class, "BPELPingComponent");
-
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void tearDown() throws Exception {
- //scaDomain.close();
- }
-
- public void testInvoke() {
- /*
- String response = bpelService.Ping("Ping");
- System.out.println("response:" + response);
- assertNotNull(response);
- */
- // assertEquals("Hello World", response);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java
deleted file mode 100644
index 313bd66850..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java
+++ /dev/null
@@ -1,62 +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.pong.PongPortType;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * Tests the BPEL service
- *
- * @version $Rev$ $Date$
- */
-public class BPELPongTestCase extends TestCase {
-
- private SCADomain scaDomain;
- PongPortType bpelService = null;
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("pong/pong.composite");
- bpelService = scaDomain.getService(PongPortType.class, "BPELPongComponent");
-
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
- }
-
- public void testInvoke() {
- String response = bpelService.Pong("Pong");
- System.out.println("response:" + response);
- assertNotNull(response);
-
- // assertEquals("Hello World", response);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java
deleted file mode 100644
index 29f5cb74fc..0000000000
--- a/branches/sca-java-1.1/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("helloworld/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("<message><TestPart><hello xmlns=\"http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl\">Hello</hello></TestPart></message>"));
- 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();
- }
- }
- }
-
-}