Author: antelder
Date: Tue Nov 13 04:33:01 2007
New Revision: 594508

URL: http://svn.apache.org/viewvc?rev=594508&view=rev
Log:
Add a testcase

Added:
    incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/
    incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/
    
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/
    
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/
    
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/
    
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/
    
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/LauncherTestCase.java
   (with props)
    incubator/tuscany/java/sca/distribution/standalone/src/test/resources/
    incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/
    
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/helloworld-ws-js.jar
   (with props)
    
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties
   (with props)
Modified:
    incubator/tuscany/java/sca/distribution/standalone/   (props changed)
    
incubator/tuscany/java/sca/distribution/standalone/src/main/java/org/apache/tuscany/sca/runtime/standalone/Launcher.java

Propchange: incubator/tuscany/java/sca/distribution/standalone/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Nov 13 04:33:01 2007
@@ -0,0 +1,17 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
+>>>>>>> .r585965

Modified: 
incubator/tuscany/java/sca/distribution/standalone/src/main/java/org/apache/tuscany/sca/runtime/standalone/Launcher.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/distribution/standalone/src/main/java/org/apache/tuscany/sca/runtime/standalone/Launcher.java?rev=594508&r1=594507&r2=594508&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/distribution/standalone/src/main/java/org/apache/tuscany/sca/runtime/standalone/Launcher.java
 (original)
+++ 
incubator/tuscany/java/sca/distribution/standalone/src/main/java/org/apache/tuscany/sca/runtime/standalone/Launcher.java
 Tue Nov 13 04:33:01 2007
@@ -114,6 +114,15 @@
           startDomainManager();
         }
         
+        startNode();
+
+        initHotDeploy(repository);
+
+        logger.log(Level.INFO, "SCA runtime started");
+    }
+
+    private void startNode() throws NodeException, URISyntaxException {
+        logger.log(Level.INFO, "SCA runtime starting node " + nodeName);
         classLoader = new AddableURLClassLoader(new URL[] {}, 
Thread.currentThread().getContextClassLoader());
         Thread.currentThread().setContextClassLoader(classLoader);
         
@@ -128,13 +137,13 @@
         }
         
         node.start();
-        initHotDeploy(repository);
-
-        logger.log(Level.INFO, "SCA runtime started");
+        logger.log(Level.INFO, "SCA runtime started node " + nodeName);
     }
     
     protected void startDomainManager() throws DomainException {
+        logger.log(Level.INFO, "SCA runtime starting domain manager");
         managerDomain = 
SCADomainFactory.newInstance().createSCADomain("http://localhost:8080/tuscany/manager";);
 
+        logger.log(Level.INFO, "SCA runtime started domain manager");
     }
 
     public void stop() {

Added: 
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/LauncherTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/LauncherTestCase.java?rev=594508&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/LauncherTestCase.java
 (added)
+++ 
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/LauncherTestCase.java
 Tue Nov 13 04:33:01 2007
@@ -0,0 +1,52 @@
+/*
+ * 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.runtime.standalone;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.domain.DomainException;
+import org.apache.tuscany.sca.node.NodeException;
+
+public class LauncherTestCase extends TestCase {
+    
+    private File repo;
+    private Launcher launcher;
+
+    public void test1() throws NodeException, URISyntaxException, 
InterruptedException, DomainException {
+        launcher.start();
+    }
+
+    public void setUp() throws URISyntaxException {
+        URL propsURL = 
getClass().getClassLoader().getResource("repo/tuscany.properties");
+        repo = new File(propsURL.toURI()).getParentFile();
+        launcher = new Launcher(repo);
+    }
+    
+    public void tearDown() throws NodeException, URISyntaxException, 
InterruptedException, DomainException {
+        if (launcher != null) {
+            launcher.stop();
+        }
+    }
+
+}

Propchange: 
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/LauncherTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/distribution/standalone/src/test/java/org/apache/tuscany/sca/runtime/standalone/LauncherTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/helloworld-ws-js.jar
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/helloworld-ws-js.jar?rev=594508&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/helloworld-ws-js.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties?rev=594508&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties
 (added)
+++ 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties
 Tue Nov 13 04:33:01 2007
@@ -0,0 +1,4 @@
+#nodeName=http://localhost:8080/tuscany/myNode
+#domainName=http://localhost:8080/tuscany/domainManager
+#startManager=true
+#hotDeployInterval=10000

Propchange: 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/distribution/standalone/src/test/resources/repo/tuscany.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to