summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
Diffstat (limited to 'branches')
-rw-r--r--branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite2
-rw-r--r--branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java25
-rw-r--r--branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite2
3 files changed, 20 insertions, 9 deletions
diff --git a/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite b/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite
index 6ccc48c3f6..e692ef8e4c 100644
--- a/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite
+++ b/branches/sca-java-1.3/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite
@@ -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" />
diff --git a/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
index 12b2ab09c5..d4ea391a00 100644
--- a/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
+++ b/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
@@ -20,6 +20,7 @@ package helloworld;
import java.io.IOException;
+import org.apache.activemq.broker.BrokerService;
import org.apache.tuscany.sca.host.embedded.SCADomain;
/**
@@ -29,19 +30,29 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
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");
}
}
diff --git a/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite b/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite
index 4565a50f65..3135cdc320 100644
--- a/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite
+++ b/branches/sca-java-1.3/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite
@@ -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" />