You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2008/03/31 19:44:31 UTC
svn commit: r643081 -
/incubator/tuscany/java/sca/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java
Author: rfeng
Date: Mon Mar 31 10:44:29 2008
New Revision: 643081
URL: http://svn.apache.org/viewvc?rev=643081&view=rev
Log:
Fix for TUSCANY-2150
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java
Modified: incubator/tuscany/java/sca/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java?rev=643081&r1=643080&r2=643081&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java Mon Mar 31 10:44:29 2008
@@ -20,6 +20,7 @@
import java.io.IOException;
+import org.apache.activemq.broker.BrokerService;
import org.apache.tuscany.sca.host.embedded.SCADomain;
/**
@@ -28,8 +29,18 @@
*/
public class HelloWorldServer {
- public static void main(String[] args) {
+ protected static BrokerService startBroker() throws Exception {
+ BrokerService jmsBroker = new BrokerService();
+ jmsBroker.setPersistent(false);
+ jmsBroker.setUseJmx(false);
+ jmsBroker.addConnector("tcp://localhost:61619");
+ jmsBroker.start();
+ return jmsBroker;
+ }
+ public static void main(String[] args) throws Exception {
+
+ BrokerService broker = startBroker();
SCADomain scaDomain = SCADomain.newInstance("helloworldwsjms.composite");
try {
@@ -40,7 +51,10 @@
}
scaDomain.close();
+ broker.stop();
System.out.println("HelloWorld server stopped");
+ // FIXME: Workaround for http://issues.apache.org/jira/browse/AXIS2-3685
+ System.exit(0);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org