cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1052996 - /cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
Date Mon, 27 Dec 2010 05:10:47 GMT
Author: ningjiang
Date: Mon Dec 27 05:10:46 2010
New Revision: 1052996

URL: http://svn.apache.org/viewvc?rev=1052996&view=rev
Log:
CXF-3220 let the java_first_jms can run without jaxws API, also put the activemq-data into
target directory

Modified:
    cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java

Modified: cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java?rev=1052996&r1=1052995&r2=1052996&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
Mon Dec 27 05:10:46 2010
@@ -48,12 +48,10 @@ public final class ServerJMS {
         for (String arg : args) {
             if ("-activemqbroker".equals(arg)) {
                 launchAmqBroker = true;
-            } else if ("-jaxws".equals(arg)) {
+            } 
+            if ("-jaxws".equals(arg)) {
                 jaxws = true;
-            } else {
-                System.err.println("Invalid argument " + arg);
-                return;
-            }
+            } 
         }
 
         if (launchAmqBroker) {
@@ -70,6 +68,8 @@ public final class ServerJMS {
             Object broker = brokerClass.newInstance();
             Method addConnectorMethod = brokerClass.getMethod("addConnector", String.class);
             addConnectorMethod.invoke(broker, "tcp://localhost:61616");
+            Method setDataDirectory = brokerClass.getMethod("setDataDirectory", String.class);
+            setDataDirectory.invoke(broker, "target/activemq-data");
             Method startMethod = brokerClass.getMethod("start");
             startMethod.invoke(broker);
         }



Mime
View raw message