You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2010/03/22 09:28:29 UTC

svn commit: r925994 - in /tuscany/sca-java-2.x/trunk/distribution/tomcat: testing/helloworld-scaclient-javase/ testing/helloworld-scaclient-javase/src/main/java/testing/ testing/helloworld-scaclient-javase/src/main/java/testingxxx/ tomcat-hook/src/main...

Author: antelder
Date: Mon Mar 22 08:28:29 2010
New Revision: 925994

URL: http://svn.apache.org/viewvc?rev=925994&view=rev
Log:
Remove commons logging from tomcat war license

Added:
    tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/
      - copied from r925086, tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testing/
Removed:
    tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testing/
Modified:
    tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/pom.xml
    tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldClient.java
    tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldService.java
    tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-hook/src/main/java/org/apache/tuscany/sca/tomcat/TuscanyStandardContext.java
    tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-war/src/main/webapp/LICENSE

Modified: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/pom.xml?rev=925994&r1=925993&r2=925994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/pom.xml Mon Mar 22 08:28:29 2010
@@ -35,6 +35,11 @@
             <artifactId>tuscany-base-nodep</artifactId>
             <version>2.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.shades</groupId>
+            <artifactId>tuscany-bpel</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
 
     </dependencies>
 

Modified: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldClient.java?rev=925994&r1=925086&r2=925994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldClient.java (original)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldClient.java Mon Mar 22 08:28:29 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package testing;
+package testingxxx;
 
 import java.net.URI;
 
@@ -24,6 +24,8 @@ import org.oasisopen.sca.NoSuchDomainExc
 import org.oasisopen.sca.NoSuchServiceException;
 import org.oasisopen.sca.client.SCAClientFactory;
 
+import com.hazelcast.client.InRunnable;
+
 
 public class HelloworldClient {
 
@@ -33,11 +35,14 @@ public class HelloworldClient {
 		if (args.length > 0) {
 			domainURI = URI.create(args[0]);
 		} else {
-			domainURI = URI.create("tuscany:default?remotes=192.168.1.73:14820");
+			domainURI = URI.create("tuscanyclient:foo?remotes=127.0.0.1:14820");
 		}
+		InRunnable xx;
 		
 		SCAClientFactory factory = SCAClientFactory.newInstance(domainURI);
 		HelloworldService service = factory.getService(HelloworldService.class, "HelloworldComponent");
-		System.out.println(service.sayHello("world"));
+                System.out.println(service.sayHello("world"));
+                System.out.println(service.sayHello("world2"));
+                System.out.println(service.sayHello("world3"));
 	}
 }

Modified: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldService.java?rev=925994&r1=925086&r2=925994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldService.java (original)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-scaclient-javase/src/main/java/testingxxx/HelloworldService.java Mon Mar 22 08:28:29 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package testing;
+package testingxxx;
 
 import org.oasisopen.sca.annotation.Remotable;
 

Modified: tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-hook/src/main/java/org/apache/tuscany/sca/tomcat/TuscanyStandardContext.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-hook/src/main/java/org/apache/tuscany/sca/tomcat/TuscanyStandardContext.java?rev=925994&r1=925993&r2=925994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-hook/src/main/java/org/apache/tuscany/sca/tomcat/TuscanyStandardContext.java (original)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-hook/src/main/java/org/apache/tuscany/sca/tomcat/TuscanyStandardContext.java Mon Mar 22 08:28:29 2010
@@ -20,7 +20,6 @@
 package org.apache.tuscany.sca.tomcat;
 
 import java.io.File;
-import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.net.URI;
 import java.net.URL;
@@ -31,6 +30,7 @@ import javax.naming.NameClassPair;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 
+import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Loader;
 import org.apache.catalina.core.StandardContext;
 
@@ -49,6 +49,9 @@ public class TuscanyStandardContext exte
     // TODO: this gives an instance per webapp, work out how to have only one per server
     // ?? is that comment still true?
     private static URLClassLoader tuscanyClassLoader;
+    private static Object node;
+    private static Class<?> nodeClass;
+    private static Method nodeStopMethod;
 
     public TuscanyStandardContext() {
     }
@@ -165,9 +168,10 @@ public class TuscanyStandardContext exte
             Object instance = getInstanceMethod.invoke(null);
             Method createNodeMethod = nodeFactoryClass.getMethod("createNode", new Class[]{URI.class, new String[0].getClass()});
             URI domainURI = URI.create(TuscanyLifecycleListener.getDomainURI());
-            Object node = createNodeMethod.invoke(instance, new Object[]{domainURI, new String[0]});
-            Class<?> nodeClass = Class.forName("org.apache.tuscany.sca.node.Node", true, tuscanyClassLoader);
+            this.node = createNodeMethod.invoke(instance, new Object[]{domainURI, new String[0]});
+            this.nodeClass = Class.forName("org.apache.tuscany.sca.node.Node", true, tuscanyClassLoader);
             Method nodeStartMethod = nodeClass.getMethod("start", new Class[0]);
+            this.nodeStopMethod = nodeClass.getMethod("stop", new Class[0]);
             nodeStartMethod.invoke(node);
         } catch (Exception e) {
             throw new RuntimeException(e);
@@ -175,5 +179,18 @@ public class TuscanyStandardContext exte
             Thread.currentThread().setContextClassLoader(oldCL);
         }
     }
-    
+
+    @Override
+    public synchronized void stop() throws LifecycleException {
+        super.stop();
+        
+        if (node != null && nodeStopMethod != null) {
+            try {
+                nodeStopMethod.invoke(node);
+                node = null;
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+    }
 }

Modified: tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-war/src/main/webapp/LICENSE
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-war/src/main/webapp/LICENSE?rev=925994&r1=925993&r2=925994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-war/src/main/webapp/LICENSE (original)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/tomcat-war/src/main/webapp/LICENSE Mon Mar 22 08:28:29 2010
@@ -237,7 +237,6 @@ The following components come under Apac
  commons-fileupload-1.2.jar
  commons-httpclient-3.1.jar
  commons-io-1.4.jar
- commons-logging-1.1.1.jar
  geronimo-activation_1.1_spec-1.0.1.jar
  geronimo-javamail_1.4_spec-1.6.jar
  geronimo-jms_1.1_spec-1.1.jar