Author: jsdelfino
Date: Tue May 9 02:47:57 2006
New Revision: 405362
URL: http://svn.apache.org/viewcvs?rev=405362&view=rev
Log:
Cleanup helloworld sample
Removed:
incubator/tuscany/java/sca/samples/helloworld/src/main/resources/logging.properties
Modified:
incubator/tuscany/java/sca/samples/helloworld/src/main/java/helloworld/HelloWorldClient.java
incubator/tuscany/java/sca/samples/helloworld/src/test/java/helloworld/HelloWorldTestCase.java
Modified:
incubator/tuscany/java/sca/samples/helloworld/src/main/java/helloworld/HelloWorldClient.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/samples/helloworld/src/main/java/helloworld/HelloWorldClient.java?rev=405362&r1=405361&r2=405362&view=diff
==============================================================================
---
incubator/tuscany/java/sca/samples/helloworld/src/main/java/helloworld/HelloWorldClient.java
(original)
+++
incubator/tuscany/java/sca/samples/helloworld/src/main/java/helloworld/HelloWorldClient.java
Tue May 9 02:47:57 2006
@@ -16,17 +16,10 @@
*/
package helloworld;
-import java.util.logging.Level;
-import java.util.logging.LogManager;
-import java.util.Properties;
-
+import org.apache.tuscany.core.client.TuscanyRuntime;
import org.osoa.sca.CurrentModuleContext;
import org.osoa.sca.ModuleContext;
-import org.apache.tuscany.core.client.TuscanyRuntime;
-import org.apache.tuscany.common.monitor.MonitorFactory;
-import org.apache.tuscany.common.monitor.impl.JavaLoggingMonitorFactory;
-
/**
* This client program shows how to create an SCA runtime, start it,
* locate the HelloWorld service and invoke it.
@@ -35,13 +28,8 @@
public static final void main(String[] args) throws Exception {
- // Setup Tuscany monitoring to use java.util.logging
-
LogManager.getLogManager().readConfiguration(HelloWorldClient.class.getResourceAsStream("/logging.properties"));
- Properties levels = new Properties();
- MonitorFactory monitorFactory = new JavaLoggingMonitorFactory(levels,
Level.FINEST, "MonitorMessages");
-
// Create a Tuscany runtime for the sample module component
- TuscanyRuntime tuscany = new
TuscanyRuntime("HelloWorldModuleComponent", null, monitorFactory);
+ TuscanyRuntime tuscany = new
TuscanyRuntime("HelloWorldModuleComponent", "http://helloworld");
// Start the Tuscany runtime and associate it with this thread
tuscany.start();
@@ -58,7 +46,7 @@
System.out.println(value);
System.out.flush();
- // Disassociate the application module component
+ // Disassociate the runtime from this thread
tuscany.stop();
// Shut down the runtime
Modified:
incubator/tuscany/java/sca/samples/helloworld/src/test/java/helloworld/HelloWorldTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/samples/helloworld/src/test/java/helloworld/HelloWorldTestCase.java?rev=405362&r1=405361&r2=405362&view=diff
==============================================================================
---
incubator/tuscany/java/sca/samples/helloworld/src/test/java/helloworld/HelloWorldTestCase.java
(original)
+++
incubator/tuscany/java/sca/samples/helloworld/src/test/java/helloworld/HelloWorldTestCase.java
Tue May 9 02:47:57 2006
@@ -34,13 +34,13 @@
super.setUp();
// Create a Tuscany runtime for the sample module component
- tuscany = new TuscanyRuntime("HelloWorldModuleComponent", null);
+ tuscany = new TuscanyRuntime("HelloWorldModuleComponent",
"http://helloworld");
// Start the Tuscany runtime and associate it with this thread
tuscany.start();
}
- public void testGeetings() throws Exception {
+ public void testGreetings() throws Exception {
// Get the SCA module context.
ModuleContext moduleContext = CurrentModuleContext.getContext();
@@ -58,6 +58,9 @@
// Stop the Tuscany runtime
tuscany.stop();
+
+ // Shutdown the runtime
+ tuscany.shutdown();
super.tearDown();
}