servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1027344 - in /servicemix/smx4/features/trunk/examples/itests: cxf-http-osgi/src/main/resources/META-INF/spring/ cxf-jms-osgi/ cxf-jms-osgi/src/main/resources/META-INF/spring/ cxf-nmr-osgi/src/main/resources/META-INF/spring/ tests/src/test/...
Date Tue, 26 Oct 2010 02:01:40 GMT
Author: ffang
Date: Tue Oct 26 02:01:39 2010
New Revision: 1027344

URL: http://svn.apache.org/viewvc?rev=1027344&view=rev
Log:
[SMX4-651]add osgi service property for itests test client

Modified:
    servicemix/smx4/features/trunk/examples/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml
    servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/pom.xml
    servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/src/main/resources/META-INF/spring/beans.xml
    servicemix/smx4/features/trunk/examples/itests/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
    servicemix/smx4/features/trunk/examples/itests/tests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java

Modified: servicemix/smx4/features/trunk/examples/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml?rev=1027344&r1=1027343&r2=1027344&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml
(original)
+++ servicemix/smx4/features/trunk/examples/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml
Tue Oct 26 02:01:39 2010
@@ -52,7 +52,11 @@
      	address="http://localhost:8080/cxf/HelloWorldOSGi"/>   
  
     <osgi:service id="testHelloWorld" ref="client"
-        interface="org.apache.servicemix.examples.cxf.HelloWorld"/>
+        interface="org.apache.servicemix.examples.cxf.HelloWorld">
+        <osgi:service-properties>
+            <entry key="TEST-BUNDLE-NAME" value="cxf-http-osgi" />
+        </osgi:service-properties>
+    </osgi:service>
 
 
 </beans>

Modified: servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/pom.xml?rev=1027344&r1=1027343&r2=1027344&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/pom.xml (original)
+++ servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/pom.xml Tue Oct 26 02:01:39
2010
@@ -83,7 +83,8 @@
 							org.apache.activemq.usage,
 							org.apache.activemq.broker,
 							javax.jms,
-							org.apache.servicemix.examples.cxf
+							org.apache.servicemix.examples.cxf,
+                                                        org.apache.cxf.transport.jms, org.springframework.jms.connection
                         </Import-Package>
 						<Export-Package>org.apache.servicemix.examples.cxf_jms_osgi</Export-Package>
 						<Require-Bundle>org.apache.cxf.bundle</Require-Bundle>

Modified: servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/src/main/resources/META-INF/spring/beans.xml?rev=1027344&r1=1027343&r2=1027344&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/src/main/resources/META-INF/spring/beans.xml
(original)
+++ servicemix/smx4/features/trunk/examples/itests/cxf-jms-osgi/src/main/resources/META-INF/spring/beans.xml
Tue Oct 26 02:01:39 2010
@@ -22,7 +22,8 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xmlns:jaxws="http://cxf.apache.org/jaxws"
 	xmlns:osgi="http://www.springframework.org/schema/osgi"
-	xsi:schemaLocation="
+	xmlns:p="http://www.springframework.org/schema/p"
+        xsi:schemaLocation="
 		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 		http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
 		http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
@@ -37,7 +38,13 @@
 	    endpointName="e:HelloWorldImplPort"
 	    serviceName="s:HelloWorldImplService"
 	    xmlns:e="http://cxf.examples.servicemix.apache.org/"
-        xmlns:s="http://cxf.examples.servicemix.apache.org/"/>
+            xmlns:s="http://cxf.examples.servicemix.apache.org/">
+            <jaxws:features>
+                <bean xmlns="http://www.springframework.org/schema/beans"
+                        class="org.apache.cxf.transport.jms.JMSConfigFeature"
+                        p:jmsConfig-ref="jmsConfig"/>
+            </jaxws:features>
+        </jaxws:endpoint>
 
 
     <jaxws:client id="client" 
@@ -47,10 +54,33 @@
 	    xmlns:e="http://cxf.examples.servicemix.apache.org/"
         xmlns:s="http://cxf.examples.servicemix.apache.org/"
      	wsdlLocation="wsdl/hello_world.wsdl"
-     	/>   
+     	>
+        <jaxws:features>
+                <bean xmlns="http://www.springframework.org/schema/beans"
+                        class="org.apache.cxf.transport.jms.JMSConfigFeature"
+                        p:jmsConfig-ref="jmsConfig"/>
+        </jaxws:features>
+    </jaxws:client>   
  
+    <bean id="jmsConfig" class="org.apache.cxf.transport.jms.JMSConfiguration"
+        p:connectionFactory-ref="jmsConnectionFactory"
+        p:targetDestination="test.cxf.jmstransport.queue"
+     />
+
+     <bean id="jmsConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
+        <property name="targetConnectionFactory">
+                <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+                        <property name="brokerURL" value="tcp://localhost:61616" />
+                </bean>
+        </property>
+    </bean>
+
     <osgi:service id="testHelloWorld" ref="client"
-        interface="org.apache.servicemix.examples.cxf.HelloWorld"/>
+        interface="org.apache.servicemix.examples.cxf.HelloWorld">
+        <osgi:service-properties>
+            <entry key="TEST-BUNDLE-NAME" value="cxf-jms-osgi" />
+        </osgi:service-properties>
+    </osgi:service>
 
 
 </beans>

Modified: servicemix/smx4/features/trunk/examples/itests/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/itests/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml?rev=1027344&r1=1027343&r2=1027344&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/itests/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
(original)
+++ servicemix/smx4/features/trunk/examples/itests/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
Tue Oct 26 02:01:39 2010
@@ -58,7 +58,11 @@
     </jaxws:client>
  
     <osgi:service id="testHelloWorld" ref="client"
-        interface="org.apache.servicemix.examples.cxf.HelloWorld"/>
+        interface="org.apache.servicemix.examples.cxf.HelloWorld">
+        <osgi:service-properties>
+            <entry key="TEST-BUNDLE-NAME" value="cxf-nmr-osgi" />
+        </osgi:service-properties>
+    </osgi:service>
 
 
 </beans>

Modified: servicemix/smx4/features/trunk/examples/itests/tests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/itests/tests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java?rev=1027344&r1=1027343&r2=1027344&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/itests/tests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java
(original)
+++ servicemix/smx4/features/trunk/examples/itests/tests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java
Tue Oct 26 02:01:39 2010
@@ -177,7 +177,8 @@ public class IntegrationTest extends Abs
         waitOnContextCreation("org.apache.servicemix.examples.itests.cxf-http-osgi");
         Thread.sleep(5000);
 
-        ServiceReference ref = bundleContext.getServiceReference(HelloWorld.class.getName());
+        String filter = "(&(" + "objectclass=" + HelloWorld.class.getName() + ")(TEST-BUNDLE-NAME=cxf-http-osgi))";
+        ServiceReference ref = bundleContext.getServiceReferences(null, filter)[0];
         assertNotNull("Service Reference is null", ref);
 
         org.apache.servicemix.examples.cxf.HelloWorld helloWorld = null;
@@ -192,8 +193,8 @@ public class IntegrationTest extends Abs
         Thread.sleep(5000);
         waitOnContextCreation("org.apache.servicemix.examples.itests.cxf-jms-osgi");
         Thread.sleep(5000);
-
-        ServiceReference ref = bundleContext.getServiceReference(HelloWorld.class.getName());
+        String filter = "(&(" + "objectclass=" + HelloWorld.class.getName() + ")(TEST-BUNDLE-NAME=cxf-jms-osgi))";
+        ServiceReference ref = bundleContext.getServiceReferences(null, filter)[0];
         assertNotNull("Service Reference is null", ref);
 
         org.apache.servicemix.examples.cxf.HelloWorld helloWorld = null;



Mime
View raw message