tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r573789 - in /incubator/tuscany/java/sca/modules/implementation-bpel: ./ src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ src/test/java/org/apache/tuscany/sca/imple...
Date Sat, 08 Sep 2007 06:59:52 GMT
Author: lresende
Date: Fri Sep  7 23:59:49 2007
New Revision: 573789

URL: http://svn.apache.org/viewvc?rev=573789&view=rev
Log:
Starting EmbeddedODEServer and deploying process to it and test case to demonstrating it.

Added:
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
  (with props)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java
  (with props)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java
  (with props)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml 
 (with props)
Modified:
    incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
    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/ode/EmbeddedODEServer.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml?rev=573789&r1=573788&r2=573789&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml Fri Sep  7 23:59:49 2007
@@ -124,6 +124,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.ode</groupId>
+            <artifactId>ode-bpel-store</artifactId>
+            <version>1.0-incubating</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ode</groupId>
             <artifactId>ode-bpel-dao</artifactId>
             <version>1.0-incubating</version>
         </dependency>
@@ -280,6 +285,12 @@
             <artifactId>saxon-xpath</artifactId>
             <version>8.7</version>
         </dependency>        
+        <dependency>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
+            <version>2.3.0</version>
+        </dependency>        
+
     </dependencies>
 
 	<build>

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java?rev=573789&r1=573788&r2=573789&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
Fri Sep  7 23:59:49 2007
@@ -38,6 +38,11 @@
 import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
 import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
 
+/**
+ * BPEL document processor responsible for reading a BPEL file and producing necessary model
info about it
+ * 
+ * @version $Rev$ $Date$
+ */
 public class BPELDocumentProcessor implements URLArtifactProcessor<BPELProcessDefinition>
{
     public final static QName BPEL_PROCESS_DEFINITION = new QName("http://schemas.xmlsoap.org/ws/2004/03/business-process/",
"process");
     

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java?rev=573789&r1=573788&r2=573789&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
Fri Sep  7 23:59:49 2007
@@ -22,6 +22,8 @@
 /**
  * Thrown when a process can't be compiled properly or when its descriptors
  * are invalid.
+ * 
+ * @version $Rev$ $Date$ 
  */
 public class ODEProcessException extends RuntimeException {
     private static final long serialVersionUID = 1047893235216756186L;

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=573789&r1=573788&r2=573789&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
Fri Sep  7 23:59:49 2007
@@ -19,40 +19,58 @@
 
 package org.apache.tuscany.sca.implementation.bpel.ode;
 
-import org.apache.ode.il.config.OdeConfigProperties;
-import org.apache.ode.il.dbutil.Database;
-import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC;
-import org.apache.ode.bpel.engine.BpelServerImpl;
-import org.apache.ode.bpel.engine.CountLRUDehydrationPolicy;
-import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
-import org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl;
-import org.apache.ode.bpel.iapi.Scheduler;
-
-import java.util.Properties;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ExecutorService;
 import java.io.File;
 import java.net.URL;
+import java.util.Collection;
+import java.util.Properties;
+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;
-
-import javax.transaction.TransactionManager;
+import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC;
+import org.apache.ode.bpel.engine.BpelServerImpl;
+import org.apache.ode.bpel.engine.CountLRUDehydrationPolicy;
+import org.apache.ode.bpel.iapi.ProcessConf;
+import org.apache.ode.bpel.iapi.ProcessStore;
+import org.apache.ode.bpel.iapi.ProcessStoreEvent;
+import org.apache.ode.bpel.iapi.ProcessStoreListener;
+import org.apache.ode.bpel.iapi.Scheduler;
+import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
+import org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl;
+import org.apache.ode.il.config.OdeConfigProperties;
+import org.apache.ode.il.dbutil.Database;
+import org.apache.ode.store.ProcessStoreImpl;
 
 /**
- *
+ * Embedded ODE process server
+ * 
+ * @version $Rev$ $Date$
  */
 public class EmbeddedODEServer {
     protected final Log __log = LogFactory.getLog(getClass());
 
     private boolean _initialized;
+
     private OdeConfigProperties _config;
+
     private TransactionManager _txMgr;
+
     private Database _db;
+
     private File _workRoot;
+
     private BpelDAOConnectionFactoryJDBC _daoCF;
+
     private BpelServerImpl _bpelServer;
+
+    protected ProcessStore store;
+
     private ExecutorService _executor;
+
     private Scheduler _scheduler;
 
     public void init() throws ODEInitializationException {
@@ -86,8 +104,7 @@
             _txMgr = txFactory.getTransactionManager();
         } catch (Exception e) {
             __log.fatal("Couldn't initialize a transaction manager using Geronimo's transaction
factory.", e);
-            throw new ODEInitializationException("Couldn't initialize a transaction manager
using " +
-                    "Geronimo's transaction factory.", e);
+            throw new ODEInitializationException("Couldn't initialize a transaction manager
using " + "Geronimo's transaction factory.", e);
         }
     }
 
@@ -121,17 +138,42 @@
 
         _bpelServer.setDaoConnectionFactory(_daoCF);
         _bpelServer.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(_scheduler));
-//        _bpelServer.setEndpointReferenceContext(new EndpointReferenceContextImpl(this));
-//        _bpelServer.setMessageExchangeContext(new MessageExchangeContextImpl(this));
-//        _bpelServer.setBindingContext(new BindingContextImpl(this, _store));
+        // _bpelServer.setEndpointReferenceContext(new EndpointReferenceContextImpl(this));
+        // _bpelServer.setMessageExchangeContext(new MessageExchangeContextImpl(this));
+        // _bpelServer.setBindingContext(new BindingContextImpl(this, _store));
         _bpelServer.setScheduler(_scheduler);
         if (_config.isDehydrationEnabled()) {
             CountLRUDehydrationPolicy dehy = new CountLRUDehydrationPolicy();
             _bpelServer.setDehydrationPolicy(dehy);
         }
+
+        store = new ProcessStoreImpl(null, "jpa", true);
+        store.registerListener(new ProcessStoreListener() {
+            public void onProcessStoreEvent(ProcessStoreEvent event) {
+                // bounce the process
+                _bpelServer.unregister(event.pid);
+                if (event.type != ProcessStoreEvent.Type.UNDEPLOYED) {
+                    ProcessConf conf = (ProcessConf) store.getProcessConfiguration(event.pid);
+                    // Test processes always run with in-mem DAOs
+                    // conf.setTransient(true);  //FIXME: what should we use for ProcessConfImpl
+                    _bpelServer.register(conf);
+                }
+            }
+        });
+
         _bpelServer.init();
     }
 
+    public void stop() throws ODEShutdownException {
+        try {
+            _bpelServer.stop();
+        } catch (Exception ex) {
+            String errmsg = "An error occured during the ODE BPEL server shutdown.";
+            __log.error(errmsg, ex);
+            throw new ODEInitializationException(errmsg, ex);
+        }
+    }
+
     protected Scheduler createScheduler() {
         QuartzSchedulerImpl scheduler = new QuartzSchedulerImpl();
         scheduler.setExecutorService(_executor, 20);
@@ -139,7 +181,7 @@
         scheduler.setDataSource(_db.getDataSource());
         scheduler.init();
         return scheduler;
-    }    
+    }
 
     public boolean isInitialized() {
         return _initialized;
@@ -147,5 +189,33 @@
 
     public BpelServerImpl getBpelServer() {
         return _bpelServer;
+    }
+
+    public void deploy(ODEDeployment d) {
+        Collection<QName> procs;
+
+        try {
+            procs = store.deploy(d.deployDir);
+
+            // _deployed.add(d);
+        } catch (Exception ex) {
+            System.out.println(d + "DEPLOY: Unexpected exception: " + ex.getMessage());
+            return;
+        }
+
+        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) {
+            System.out.println(d + "REGISTER: Unexpected exception: " + ex.getMessage());
+        }
+    }
+    
+    public void undeploy(ODEDeployment d) {
+        //TODO
     }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java?rev=573789&r1=573788&r2=573789&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java
Fri Sep  7 23:59:49 2007
@@ -24,6 +24,11 @@
 
 import javax.transaction.TransactionManager;
 
+/**
+ * Geronimo transaction factory
+ * 
+ * @version $Rev$ $Date$
+ */
 public class GeronimoTxFactory {
     private static final Log __log = LogFactory.getLog(GeronimoTxFactory.class);
 

Added: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java?rev=573789&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
(added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
Fri Sep  7 23:59:49 2007
@@ -0,0 +1,43 @@
+/*
+ * 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.ode;
+
+import java.io.File;
+
+/**
+ * Deployment information
+ * 
+ * @version $Rev$ $Date$
+ */
+public class ODEDeployment {
+    /** The directory containing the deploy.xml and artefacts. */
+    public File deployDir;
+
+    /** If non-null the type of exception we expect to get when we deploy. */
+    public Class expectedException = null;
+
+    public ODEDeployment(File deployDir) {
+        this.deployDir = deployDir;
+    }
+
+    public String toString() {
+        return "Deployment#" + deployDir;
+    }
+}
\ No newline at end of file

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

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

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java?rev=573789&r1=573788&r2=573789&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java
Fri Sep  7 23:59:49 2007
@@ -21,6 +21,8 @@
 
 /**
  * Thrown when ODE failed to initialize one if its needed resources.
+ * 
+ * @version $Rev$ $Date$
  */
 public class ODEInitializationException extends RuntimeException {
     private static final long serialVersionUID = -2869674556330744215L;

Added: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java?rev=573789&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java
(added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java
Fri Sep  7 23:59:49 2007
@@ -0,0 +1,41 @@
+/*
+ * 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.ode;
+
+/**
+ * Thrown when ODE failed to shutdown.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class ODEShutdownException extends RuntimeException {
+    private static final long serialVersionUID = -2869674556330744215L;
+
+    public ODEShutdownException(Throwable cause) {
+        super(cause);
+    }
+
+    public ODEShutdownException(String message) {
+        super(message);
+    }
+
+    public ODEShutdownException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

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

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

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java?rev=573789&r1=573788&r2=573789&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java
Fri Sep  7 23:59:49 2007
@@ -33,6 +33,7 @@
     /**
      * @throws java.lang.Exception
      */
+    @Override
     protected void setUp() throws Exception {
         //scaDomain = SCADomain.newInstance("helloworld.composite");
         //bpelService = scaDomain.getService(BPEL.class, "BPELHelloWorldComponent");
@@ -42,15 +43,12 @@
     /**
      * @throws java.lang.Exception
      */
+    @Override
     protected void tearDown() throws Exception {
         //scaDomain.close();
     }
-
     
-    public void testCRUD() throws Exception {
-        //Object result = bpelService.invokeProcess("something");
-        //assertEquals("something", result);
+    public void testSomething() {
+        
     }
-
-
 }

Added: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java?rev=573789&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java
(added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java
Fri Sep  7 23:59:49 2007
@@ -0,0 +1,61 @@
+/*
+ * 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 junit.framework.TestCase;
+
+import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer;
+import org.apache.tuscany.sca.implementation.bpel.ode.ODEDeployment;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EmbeddedODEServerTestCase extends TestCase {
+
+    private EmbeddedODEServer odeServer;
+    
+    @Override
+    protected void setUp() throws Exception {
+        this.odeServer = new EmbeddedODEServer();
+        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(deploymentDir);
+        if(odeServer.isInitialized()) {
+            odeServer.deploy(new ODEDeployment(deploymentDir));
+        }
+    }
+
+}

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

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

Added: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml?rev=573789&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml (added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml Fri
Sep  7 23:59:49 2007
@@ -0,0 +1,30 @@
+<!--
+  ~ 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:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld" 
+	xmlns:wns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl">
+
+
+	<process name="tns:HelloWorld">
+		<active>true</active>
+		<provide partnerLink="helloPartnerLink">
+			<service name="wns:HelloService" port="HelloPort"/>
+		</provide>
+	</process>
+</deploy>

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/deploy.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



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


Mime
View raw message