You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2008/04/17 17:12:35 UTC

svn commit: r649147 - in /incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel: impl/ ode/ provider/

Author: lresende
Date: Thu Apr 17 08:12:32 2008
New Revision: 649147

URL: http://svn.apache.org/viewvc?rev=649147&view=rev
Log:
Latest local changes for supporting References to SCA components. It has some hard coded info there, but it's not breaking the build. This is to allow others to jump and help

Added:
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessException.java   (with props)
Removed:
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ThreadRuntimeComponentContext.java
Modified:
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java?rev=649147&r1=649146&r2=649147&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java Thu Apr 17 08:12:32 2008
@@ -149,6 +149,8 @@
                 refMap.put(ref.getName(), ref);
             }
             for (Reference reference : componentType.getReferences()) {
+            	//set default dataBinding to DOM to help on reference invocation
+            	reference.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
                 refMap.put(reference.getName(), reference);
             }
             impl.getReferences().clear();
@@ -193,13 +195,13 @@
     private QName getAttributeValueNS(XMLStreamReader reader, String attribute) {
         String fullValue = reader.getAttributeValue(null, "process");
         if (fullValue.indexOf(":") < 0)
-            throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
+            throw new BPELProcessException("Attribute " + attribute + " with value " + fullValue +
                     " in your composite should be prefixed (process=\"prefix:name\").");
         String prefix = fullValue.substring(0, fullValue.indexOf(":"));
         String name = fullValue.substring(fullValue.indexOf(":") + 1);
         String nsUri = reader.getNamespaceContext().getNamespaceURI(prefix);
         if (nsUri == null)
-            throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
+            throw new BPELProcessException("Attribute " + attribute + " with value " + fullValue +
                     " in your composite has un unrecognized namespace prefix.");
         return new QName(nsUri, name, prefix);
     }

Added: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessException.java?rev=649147&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessException.java (added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessException.java Thu Apr 17 08:12:32 2008
@@ -0,0 +1,42 @@
+/*
+ * 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.impl;
+
+/**
+ * Thrown when a process can't be compiled properly or when its descriptors
+ * are invalid.
+ * 
+ * @version $Rev$ $Date$ 
+ */
+public class BPELProcessException extends RuntimeException {
+    private static final long serialVersionUID = 1047893235216756186L;
+
+    public BPELProcessException(String message) {
+        super(message);
+    }
+
+    public BPELProcessException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public BPELProcessException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java?rev=649147&r1=649146&r2=649147&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java Thu Apr 17 08:12:32 2008
@@ -21,11 +21,13 @@
 
 import java.io.File;
 import java.net.URL;
-import java.util.Collection;
+import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 import javax.transaction.TransactionManager;
-import javax.xml.namespace.QName;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -44,6 +46,7 @@
 import org.apache.ode.scheduler.simple.SimpleScheduler;
 import org.apache.ode.store.ProcessStoreImpl;
 import org.apache.ode.utils.GUID;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
 
 /**
  * Embedded ODE process server
@@ -70,7 +73,10 @@
     protected ProcessStore store;
 
     private Scheduler _scheduler;
+    
+    protected ExecutorService _executorService;
 
+    private Map<String, RuntimeComponent> tuscanyRuntimeComponents = new ConcurrentHashMap<String, RuntimeComponent>();
     
     public EmbeddedODEServer(TransactionManager txMgr) {
         _txMgr = txMgr;
@@ -136,6 +142,9 @@
             __log.debug("ODE initializing");
         }
         
+        //FIXME: externalize the configuration for ThreadPoolMaxSize
+        _executorService = Executors.newCachedThreadPool();
+       
         _bpelServer = new BpelServerImpl();
         _scheduler = createScheduler();
         _scheduler.setJobProcessor(_bpelServer);
@@ -247,12 +256,16 @@
     public Scheduler getScheduler() {
         return _scheduler;
     }
+    
+    public ExecutorService getExecutor() {
+    	return _executorService;
+    }
 
     public void deploy(ODEDeployment d) {
-        Collection<QName> procs;
+        /*Collection<QName> procs;*/
 
         try {
-            procs = store.deploy(d.deployDir);
+            /*procs =*/ store.deploy(d.deployDir);
 
             // _deployed.add(d);
         } catch (Exception ex) {
@@ -260,25 +273,17 @@
             __log.debug(errMsg, ex);
             throw new ODEDeploymentException(errMsg,ex);
         }
-        
-
-        /* We are already registering the process on the "register" event
-        try {
-            for (QName procName : procs) {
-                ProcessConf conf = (ProcessConf) store.getProcessConfiguration(procName);
-                // Test processes always run with in-mem DAOs
-                //conf.setTransient(true); //FIXME: what should we use for ProcessConfImpl
-                _bpelServer.register(conf);
-            }
-        } catch (Exception ex) {
-            String errMsg =">>>REGISTER: Unexpected exception: " + ex.getMessage();
-            __log.debug(errMsg , ex);
-            throw new ODEDeploymentException(errMsg, ex);
-        }
-        */
     }
-    
+
     public void undeploy(ODEDeployment d) {
         //TODO
+    }
+    
+    public void setTuscanyRuntimeComponent(String componentName, RuntimeComponent componentContext) {
+        tuscanyRuntimeComponents.put(componentName, componentContext);
+    }
+    
+    public RuntimeComponent getTuscanyRuntimeComponent(String componentName) {
+        return tuscanyRuntimeComponents.get(componentName);
     }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java?rev=649147&r1=649146&r2=649147&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java Thu Apr 17 08:12:32 2008
@@ -10,6 +10,7 @@
 import org.apache.ode.bpel.iapi.EndpointReference;
 import org.apache.ode.bpel.iapi.PartnerRoleChannel;
 import org.apache.ode.utils.DOMUtils;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -78,19 +79,25 @@
 
     private class TuscanyPRC implements PartnerRoleChannel {
         private TuscanyEPR tuscanyEPR;
+        private RuntimeComponent tuscanyRuntimeComponent;
         
         public TuscanyPRC() {
             this.tuscanyEPR = null;
         }
         
-        public TuscanyPRC(TuscanyEPR tuscanyEPR){
+        public TuscanyPRC(TuscanyEPR tuscanyEPR, RuntimeComponent tuscanyRuntimeComponent){
             this.tuscanyEPR = tuscanyEPR;
+            this.tuscanyRuntimeComponent = tuscanyRuntimeComponent;
         }
 
         public void close() {
 
         }
 
+        public RuntimeComponent getTuscanyRuntimeComponent(){
+            return this.tuscanyRuntimeComponent;
+        }
+        
         public EndpointReference getInitialEndpointReference() {
             final Document doc = DOMUtils.newDocument();
             Element serviceref = doc.createElementNS(EndpointReference.SERVICE_REF_QNAME.getNamespaceURI(),

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java?rev=649147&r1=649146&r2=649147&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java Thu Apr 17 08:12:32 2008
@@ -1,15 +1,23 @@
 package org.apache.tuscany.sca.implementation.bpel.ode;
 
+import java.util.concurrent.Callable;
+
+import javax.xml.namespace.QName;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.iapi.BpelEngineException;
 import org.apache.ode.bpel.iapi.ContextException;
+import org.apache.ode.bpel.iapi.Message;
+import org.apache.ode.bpel.iapi.MessageExchange;
 import org.apache.ode.bpel.iapi.MessageExchangeContext;
 import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
 import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
-import org.apache.tuscany.sca.assembly.ComponentReference;
-import org.apache.tuscany.sca.implementation.bpel.impl.ThreadRuntimeComponentContext;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.ode.utils.DOMUtils;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 /**
  * Message Exchange Context information
@@ -31,15 +39,163 @@
         
         System.out.println(">>> Invoking a partner operation: " + partnerRoleMessageExchange.getOperationName());
         
-        RuntimeComponent tuscanyRuntimeComponent = ThreadRuntimeComponentContext.getRuntimeComponent();
-        for(ComponentReference componentReference : tuscanyRuntimeComponent.getReferences()) {
-            System.out.println("Reference : " + componentReference.getName());
-            componentReference.getBindings().get(0);
-        }
+        ODEExternalService scaService = new ODEExternalService(_server);
+        scaService.invoke(partnerRoleMessageExchange);
+        
+        
+//        boolean isTwoWay = partnerRoleMessageExchange.getMessageExchangePattern() == org.apache.ode.bpel.iapi.MessageExchange.MessageExchangePattern.REQUEST_RESPONSE;
+//        
+//        
+//        try {
+//            RuntimeComponent tuscanyRuntimeComponent = _server.getTuscanyRuntimeComponent("HelloWorldService");
+//            
+//            RuntimeComponentReference runtimeComponentReference = (RuntimeComponentReference) tuscanyRuntimeComponent.getReferences().get(0);
+//            RuntimeWire runtimeWire = runtimeComponentReference.getRuntimeWire(runtimeComponentReference.getBindings().get(0));
+//
+//            //convert operations
+//            Operation operation = findOperation(partnerRoleMessageExchange.getOperation().getName(), runtimeComponentReference);
+//            
+//            
+//            /* This is how a request looks like (payload is wrapped with extra info)
+//            <?xml version="1.0" encoding="UTF-8"?>
+//            <message>
+//              <parameters>
+//                <getGreetings xmlns="http://greetings">
+//                  <message xmlns="http://helloworld">Luciano</message>
+//                </getGreetings>
+//              </parameters>
+//            </message>
+//            */            
+//            Element msg = partnerRoleMessageExchange.getRequest().getMessage();
+//            if( msg != null) {
+//	            String xml = DOMUtils.domToString(msg);
+//	            System.out.println(">>> " + xml);
+//	            
+//	            String payload = DOMUtils.domToString(getPayload(partnerRoleMessageExchange.getRequest()));
+//	            System.out.println(">>> " + payload);
+//	            
+//	            Object[] args = new Object[] {getPayload(partnerRoleMessageExchange.getRequest())};
+//
+//            	Object result = null;
+//            	boolean success = false;
+//            	
+//            	try {
+//            		result = runtimeWire.invoke(operation, args);
+//            		success = true;
+//            	} catch(Exception e) {
+//            		partnerRoleMessageExchange.replyWithFailure(MessageExchange.FailureType.OTHER, e.getMessage(), null);
+//            	}
+//            	
+//            	//partnerRoleMessageExchange.getResponse().setMessage(null);
+//            	System.out.println(">>> Result : " + DOMUtils.domToString((Element)result));
+//
+//            	if(!success) {
+//            		return;
+//            	}
+//            	
+//            	//process results based on type of message invocation
+//            	if(isTwoWay) {
+//            		//two way invocation
+//					//Message response = createResponseMessage(partnerRoleMessageExchange, (Element) result);
+//					//partnerRoleMessageExchange.reply(response);
+//					
+//					replyTwoWayInvocation(partnerRoleMessageExchange.getMessageExchangeId(), (Element) result);
+//    					
+//            	} else {
+//            		//one way invocation
+//	            	partnerRoleMessageExchange.replyOneWayOk();
+//            	}
+//            }
+//
+//        } catch (Exception e) {
+//        	e.printStackTrace();
+//        }
     }
 
     public void onAsyncReply(MyRoleMessageExchange myRoleMessageExchange) throws BpelEngineException {
         if (__log.isDebugEnabled())
             __log.debug("Processing an async reply from service " + myRoleMessageExchange.getServiceName());  
+    }
+    
+    /**
+     * Find the SCA Reference operation
+     * @param operationName
+     * @param runtimeComponentReference
+     * @return
+     */
+    private Operation findOperation(String operationName, RuntimeComponentReference runtimeComponentReference) {
+    	Operation reseultOperation = null;
+    	
+    	for(Operation operation : runtimeComponentReference.getInterfaceContract().getInterface().getOperations()) {
+    		if (operationName.equalsIgnoreCase(operation.getName())) {
+    			reseultOperation = operation;
+    			break;
+    		}
+    	}
+    	return reseultOperation;
+    }
+    
+    /**
+     * Get paylod from a given ODEMessage
+     * @param odeMessage
+     * @return
+     */
+    private Element getPayload(Message odeMessage) {
+    	Element payload = null;
+    	Element parameters = odeMessage.getPart("parameters");
+    	
+    	if( parameters != null && parameters.hasChildNodes()) {
+    		payload = (Element) parameters.getFirstChild().getFirstChild();
+    	}
+    	
+    	return payload;
+    }
+    
+
+    private void replyTwoWayInvocation(final String odeMexId, final Element result) {
+    	try {
+    		_server.getScheduler().execIsolatedTransaction( new Callable<Void>() {
+    			public Void call() throws Exception {
+    				PartnerRoleMessageExchange odeMex = null;
+    				try {
+    					odeMex = (PartnerRoleMessageExchange)  _server.getBpelServer().getEngine().getMessageExchange(odeMexId);
+    					if (odeMex != null) {
+    						Message response = createResponseMessage(odeMex, (Element) result);
+    						odeMex.reply(response);
+    					}
+    				} catch (Exception ex) {
+    					String errmsg = "Unable to process response: " + ex.getMessage();
+    					if (odeMex != null) {
+    						odeMex.replyWithFailure(MessageExchange.FailureType.OTHER, errmsg, null);
+    					}
+    				}
+    				
+    				return null;
+    			}
+    		});    		
+    	} catch(Exception ex) {
+    		ex.printStackTrace();
+    	}
+    	
+    }
+
+    
+    private Message createResponseMessage(PartnerRoleMessageExchange partnerRoleMessageExchange, Element invocationResult) {
+    	Document dom = DOMUtils.newDocument();
+        
+        Element contentMessage = dom.createElement("message");
+        Element contentPart = dom.createElement(partnerRoleMessageExchange.getOperation().getOutput().getName());
+        
+        contentPart.appendChild(dom.importNode(invocationResult, true));
+        contentMessage.appendChild(contentPart);
+        dom.appendChild(contentMessage);
+        
+        System.out.println("::result message:: " + DOMUtils.domToString(dom.getDocumentElement()));
+
+		QName id = partnerRoleMessageExchange.getOperation().getOutput().getMessage().getQName();
+		Message response = partnerRoleMessageExchange.createMessage(id);
+		response.setMessage(dom.getDocumentElement());
+                
+        return response;
     }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java?rev=649147&r1=649146&r2=649147&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java Thu Apr 17 08:12:32 2008
@@ -23,6 +23,8 @@
 
 import javax.transaction.TransactionManager;
 
+import org.apache.tuscany.sca.assembly.ComponentReference;
+import org.apache.tuscany.sca.databinding.xml.DOMDataBinding;
 import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
 import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer;
 import org.apache.tuscany.sca.implementation.bpel.ode.ODEDeployment;
@@ -75,7 +77,7 @@
 
     public void start() {
         System.out.println("Starting " + component.getName());
-
+        
         try {
             if (!odeServer.isInitialized()) {
                 // start ode server
@@ -91,6 +93,7 @@
             if (odeServer.isInitialized()) {
                 try {
                     txMgr.begin();
+                    odeServer.setTuscanyRuntimeComponent(component.getName(), component);
                     odeServer.deploy(new ODEDeployment(deploymentDir));
                     txMgr.commit();
                 } catch (Exception e) {

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java?rev=649147&r1=649146&r2=649147&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java Thu Apr 17 08:12:32 2008
@@ -32,7 +32,6 @@
 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.impl.ThreadRuntimeComponentContext;
 import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer;
 import org.apache.tuscany.sca.interfacedef.Interface;
 import org.apache.tuscany.sca.interfacedef.Operation;
@@ -109,10 +108,6 @@
             throw new InvocationTargetException(null,"Unsupported service contract");
         }
         
-        System.out.println(">>> Set ThreadLocal with runtime component !");
-
-        ThreadRuntimeComponentContext.setRuntimeComponent(component);
-        
         org.apache.ode.bpel.iapi.MyRoleMessageExchange mex = null;
         Future onhold = null;
         
@@ -167,8 +162,7 @@
             } catch (SystemException se) {
 
             }
-            throw new InvocationTargetException(e, "Error retrieving BPEL process invocation status : " + e
-                .getMessage());
+            throw new InvocationTargetException(e, "Error retrieving BPEL process invocation status : " + e.getMessage());
         }
     
     



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org