cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r469064 - in /incubator/cxf/trunk/distribution/src/main/release/samples: jms_pubsub/ jms_pubsub/src/demo/jms_greeter/broker/ jms_queue/ jms_queue/src/demo/jms_greeter/broker/
Date Mon, 30 Oct 2006 04:54:36 GMT
Author: ningjiang
Date: Sun Oct 29 20:54:35 2006
New Revision: 469064

URL: http://svn.apache.org/viewvc?view=rev&rev=469064
Log:
update the jms examples for CPI test

Added:
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/EmbeddedBroker.java
  (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/EmbeddedBroker.java
  (with props)
Modified:
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/build.xml

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/README.txt?view=diff&rev=469064&r1=469063&r2=469064
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/README.txt Sun Oct
29 20:54:35 2006
@@ -12,7 +12,7 @@
 Prerequisite
 ------------
 
-If your environment already includes cxf-incubator.jar on the
+If your environment already includes cxf.jar on the
 CLASSPATH, and the JDK and ant bin directories on the PATH
 it is not necessary to run the environment script described in
 the samples directory README.  If your environment is not
@@ -22,7 +22,7 @@
 
 This demo need to play with ActiveMQ 4.0.X, Before you run this
 Demo, please make sure you had installed the ActiveMQ 4.0.X and
-set ACTIVE_HOME enviroment variables.
+set ACTIVE_HOME and ACTIVE_VERSION environment variables.
 
 Befor you run this demo, please start up the JMS message broker first.
 
@@ -52,6 +52,7 @@
 Using either UNIX or Windows:
 
   ant build
+  ant jmsbroker.start 
   ant server
   ant client
     
@@ -85,12 +86,12 @@
 
 For UNIX:  
   
-  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf.jar:./build/classes
+  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/celtix.jar:./build/classes
   javac -d build/classes src/demo/jms_greeter/client/*.java
   javac -d build/classes src/demo/jms_greeter/server/*.java
 
 For Windows:
-  set classpath=%classpath%;%CXF_HOME%\lib\cxf.jar;.\build\classes
+  set classpath=%classpath%;%CXF_HOME%\lib\celtix.jar;.\build\classes
   javac -d build\classes src\demo\jms_greeter\client\*.java
   javac -d build\classes src\demo\jms_greeter\server\*.java
 

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/build.xml?view=diff&rev=469064&r1=469063&r2=469064
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/build.xml Sun Oct
29 20:54:35 2006
@@ -23,23 +23,31 @@
         <isset property="env.ACTIVEMQ_HOME"/>
     </condition>
 
-    <fail message="this sample need to use activemq, please setup  ACTIVEMQ_HOME."
+    <fail message="this sample need to use activemq, please setup  ACTIVEMQ_HOME in your
environment"
         unless="activemq.home"/>
+    <condition property="activemq.version" value="${env.ACTIVEMQ_VERSION}">
+        <isset property="env.ACTIVEMQ_VERSION"/>
+    </condition>
+    <fail message="this sample need to use activemq, please setup ACTIVEMQ_VERSION in
your envrionment"
+        unless="activemq.version"/>
 
-    <property name="thirdparty.classpath" location="${activemq.home}/incubator-activemq-4.0.2.jar"/>
+    <property name="thirdparty.classpath" location="${activemq.home}/incubator-activemq-${activemq.version}.jar"/>
     
     <import file="../common_build.xml"/>
 
     <property name="wsdl.dir" location="${basedir}/wsdl"/>
     <property name="wsdl.file" value="jms_greeter.wsdl"/>
 
+    <target name="jmsbroker.start" description="run jms broker" depends="build">
+       <cxfrun classname="demo.jms_greeter.broker.EmbeddedBroker" />
+    </target>
+
     <target name="client" description="run demo client" depends="build">
         <property name="param1" value=""/>
         <property name="param2" value=""/>
         <property name="param3" value=""/>
         <cxfrun classname="demo.jms_greeter.client.Client" param1="${basedir}/wsdl/jms_greeter.wsdl"
param2="${op}" param3="${param1}" param4="${param2}" param5="${param3}"/>
     </target>
-    
 
     <target name="server" description="run demo server" depends="build">
         <cxfrun classname="demo.jms_greeter.server.Server" param1="${basedir}/wsdl/jms_greeter.wsdl"/>

Added: incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/EmbeddedBroker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/EmbeddedBroker.java?view=auto&rev=469064
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/EmbeddedBroker.java
(added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/EmbeddedBroker.java
Sun Oct 29 20:54:35 2006
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.jms_greeter.broker;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
+
+public final class EmbeddedBroker {
+    private EmbeddedBroker() {
+    }
+
+    public static void main(String[] args) throws Exception {
+        BrokerService broker = new BrokerService();
+        broker.setPersistenceAdapter(new MemoryPersistenceAdapter());
+        broker.addConnector("tcp://localhost:61616");
+        broker.start();
+        System.out.println("JMS broker ready ...");
+        Thread.sleep(125 * 60 * 1000);
+        System.out.println("JMS broker exiting");
+        broker.stop();
+        System.exit(0);
+    }
+}
+

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/EmbeddedBroker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/jms_pubsub/src/demo/jms_greeter/broker/EmbeddedBroker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt?view=diff&rev=469064&r1=469063&r2=469064
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt Sun Oct
29 20:54:35 2006
@@ -12,7 +12,7 @@
 Prerequisite
 ------------
 
-If your environment already includes cxf-incubator.jar on the
+If your environment already includes cxf.jar on the
 CLASSPATH, and the JDK and ant bin directories on the PATH
 it is not necessary to run the environment script described in
 the samples directory README.  If your environment is not
@@ -22,7 +22,7 @@
 
 This demo need to play with ActiveMQ 4.X, Before you run this
 Demo, please make sure you had installed the ActiveMQ 4.X and
-set ACTIVE_HOME enviroment variables.
+set ACTIVE_HOME and ACTIVE_VERSION environment variables.
 
 Befor you run this demo, please start up the JMS message broker first.
 
@@ -85,12 +85,12 @@
 
 For UNIX:  
   
-  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf.jar:./build/classes
+  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/celtix.jar:./build/classes
   javac -d build/classes src/demo/jms_greeter/client/*.java
   javac -d build/classes src/demo/jms_greeter/server/*.java
 
 For Windows:
-  set classpath=%classpath%;%CXF_HOME%\lib\cxf.jar;.\build\classes
+  set classpath=%classpath%;%CXF_HOME%\lib\celtix.jar;.\build\classes
   javac -d build\classes src\demo\jms_greeter\client\*.java
   javac -d build\classes src\demo\jms_greeter\server\*.java
 

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/build.xml?view=diff&rev=469064&r1=469063&r2=469064
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/build.xml Sun Oct
29 20:54:35 2006
@@ -22,26 +22,35 @@
     <condition property="activemq.home" value="${env.ACTIVEMQ_HOME}">
         <isset property="env.ACTIVEMQ_HOME"/>
     </condition>
-    <fail message="this sample need to use activemq, please setup  ACTIVEMQ_HOME."
+    <fail message="this sample need to use activemq, please setup  ACTIVEMQ_HOME in your
environment"
         unless="activemq.home"/>
+    <condition property="activemq.version" value="${env.ACTIVEMQ_VERSION}">
+	<isset property="env.ACTIVEMQ_VERSION"/>
+    </condition>
+    <fail message="this sample need to use activemq, please setup ACTIVEMQ_VERSION in
your envrionment"
+        unless="activemq.version"/>
 
-    <property name="thirdparty.classpath" location="${activemq.home}/incubator-activemq-4.0.2.jar"/>
+    <property name="thirdparty.classpath" location="${activemq.home}/incubator-activemq-${activemq.version}.jar"/>
 
     <import file="../common_build.xml"/>
 
     <property name="wsdl.dir" location="${basedir}/wsdl"/>
     <property name="wsdl.file" value="jms_greeter.wsdl"/>
+    
+    <target name="jmsbroker.start" description="run jms broker" depends="build">
+       <cxfrun classname="demo.jms_greeter.broker.EmbeddedBroker" /> 
+    </target>
 
     <target name="client" description="run demo client" depends="build">
         <property name="param1" value=""/>
         <property name="param2" value=""/>
         <property name="param3" value=""/>
-        <cxfrun classname="demo.jms_greeter.client.Client" jvmarg1="-Dceltix.config.file=file:///${basedir}/wsdl/jms_greeter_config.xml"
param1="${basedir}/wsdl/jms_greeter.wsdl" param2="${op}" param3="${param1}" param4="${param2}"
param5="${param3}"/>
+        <cxfrun classname="demo.jms_greeter.client.Client" param1="${basedir}/wsdl/jms_greeter.wsdl"
param2="${op}" param3="${param1}" param4="${param2}" param5="${param3}"/>
     </target>
     
-
+    
     <target name="server" description="run demo server" depends="build">
-        <cxfrun classname="demo.jms_greeter.server.Server" jvmarg1="-Dceltix.config.file=file:///${basedir}/wsdl/jms_greeter_config.xml"
param1="${basedir}/wsdl/jms_greeter.wsdl"/>
+        <cxfrun classname="demo.jms_greeter.server.Server" param1="${basedir}/wsdl/jms_greeter.wsdl"/>
     </target>
 
     <target name="generate.code" unless="codegen.notrequired">

Added: incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/EmbeddedBroker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/EmbeddedBroker.java?view=auto&rev=469064
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/EmbeddedBroker.java
(added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/EmbeddedBroker.java
Sun Oct 29 20:54:35 2006
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.jms_greeter.broker;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
+
+public final class EmbeddedBroker {
+    private EmbeddedBroker() {
+    }
+
+    public static void main(String[] args) throws Exception {
+        BrokerService broker = new BrokerService();
+        broker.setPersistenceAdapter(new MemoryPersistenceAdapter());
+        broker.addConnector("tcp://localhost:61616");
+        broker.start();
+        System.out.println("JMS broker ready ...");
+        Thread.sleep(125 * 60 * 1000);
+        System.out.println("JMS broker exiting");
+        broker.stop();
+        System.exit(0);
+    }
+}
+

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/EmbeddedBroker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/jms_queue/src/demo/jms_greeter/broker/EmbeddedBroker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message