tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r673370 - in /tuscany/branches/sca-java-1.3/samples: helloworld-reference-jms/src/main/resources/ helloworld-service-jms/src/main/java/helloworld/ helloworld-service-jms/src/main/resources/
Date Wed, 02 Jul 2008 11:56:35 GMT
Author: slaws
Date: Wed Jul  2 04:56:34 2008
New Revision: 673370

URL: http://svn.apache.org/viewvc?rev=673370&view=rev
Log:
TUSCANY-2420 start ActiveMQ when the server runs

Modified:
    tuscany/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite
    tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
    tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite

Modified: tuscany/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite?rev=673370&r1=673369&r2=673370&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite
(original)
+++ tuscany/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite
Wed Jul  2 04:56:34 2008
@@ -20,7 +20,7 @@
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
 	targetNamespace="http://helloworld"
 	xmlns:hw="http://helloworld"
-    name="helloworldws">
+    name="helloworld">
 
     <component name="HelloWorldServiceComponent">
         <implementation.java class="helloworld.HelloWorldImpl" />

Modified: tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java?rev=673370&r1=673369&r2=673370&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
(original)
+++ tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
Wed Jul  2 04:56:34 2008
@@ -20,6 +20,7 @@
 
 import java.io.IOException;
 
+import org.apache.activemq.broker.BrokerService;
 import org.apache.tuscany.sca.host.embedded.SCADomain;
 
 /**
@@ -29,19 +30,29 @@
 public class HelloWorldServer {
 
     public static void main(String[] args) {
-
-    	// ActiveMQModuleActivator.startBroker();
-        SCADomain scaDomain = SCADomain.newInstance("helloworldjmsservice.composite");
-
         try {
+            BrokerService jmsBroker;
+            jmsBroker = new BrokerService(); 
+            jmsBroker.setPersistent(false);
+            jmsBroker.setUseJmx(false);
+            jmsBroker.addConnector("tcp://localhost:61619");
+            jmsBroker.start();
+            
+            SCADomain scaDomain = SCADomain.newInstance("helloworldjmsservice.composite");
+
             System.out.println("HelloWorld server started (press enter to shutdown)");
             System.in.read();
+
+            scaDomain.close();
+            
+            jmsBroker.stop();
+            System.out.println("HelloWorld server stopped");
+        
         } catch (IOException e) {
             e.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
         }
-
-        scaDomain.close();
-        System.out.println("HelloWorld server stopped");
     }
 
 }

Modified: tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite?rev=673370&r1=673369&r2=673370&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite
(original)
+++ tuscany/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite
Wed Jul  2 04:56:34 2008
@@ -21,7 +21,7 @@
         xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
 	targetNamespace="http://helloworld"
 	xmlns:hw="http://helloworld"
-    name="helloworldws">
+    name="helloworld">
 
     <component name="HelloWorldServiceComponent">
         <implementation.java class="helloworld.HelloWorldImpl" />



Mime
View raw message