incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject svn commit: r1034351 - in /incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main: java/org/apache/aries/samples/goat/web/ resources/OSGI-INF/ resources/OSGI-INF/blueprint/ resources/OSGI-INF/cxf/ resources/OSGI-INF/cxf/intents/ resources/OSGI-...
Date Fri, 12 Nov 2010 11:39:47 GMT
Author: zoe
Date: Fri Nov 12 11:39:47 2010
New Revision: 1034351

URL: http://svn.apache.org/viewvc?rev=1034351&view=rev
Log:
ARIES-476 Updated web bundle to use remote service

Added:
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/blueprint/
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/blueprint/blueprint.xml
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/cxf/
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/cxf/intents/
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/cxf/intents/blah.blah
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/remote-service/
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/remote-service/remote-services.xml
Modified:
    incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java

Modified: incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java?rev=1034351&r1=1034350&r2=1034351&view=diff
==============================================================================
--- incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java
(original)
+++ incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java
Fri Nov 12 11:39:47 2010
@@ -42,16 +42,22 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
 
 public class ServerSideClass {
 
 	private String modelInfoServiceHint = "";
 
 	private ModelInfoService ModelInfoService = null;
+	
+	private ModelInfoService blah;
 
 	private Map<ModelInfoService, ComponentInfoProvider.ComponentInfoListener> clisteners
= new HashMap<ModelInfoService, ComponentInfoProvider.ComponentInfoListener>();
 	private Map<ModelInfoService, RelationshipInfoProvider.RelationshipInfoListener> rlisteners
= new HashMap<ModelInfoService, RelationshipInfoProvider.RelationshipInfoListener>();
 
+	public ServerSideClass(ModelInfoService blah) {
+		this.blah = blah;
+	}
 	private class ComponentInfoListenerImpl implements
 			ComponentInfoProvider.ComponentInfoListener {
 		String server;
@@ -155,6 +161,7 @@ public class ServerSideClass {
 								ModelInfoService.class.getName(),
 								"(displayName=" + this.modelInfoServiceHint
 										+ ")");
+						
 						if (sr != null) {
 							System.err.println("Getting bcip");
 							this.ModelInfoService = (ModelInfoService) b_ctx
@@ -263,6 +270,11 @@ public class ServerSideClass {
 
 						String name = (String.valueOf(sr
 								.getProperty("displayName")));
+						
+						Long bid = sr.getBundle().getBundleId();
+						
+						System.err.println("ZZZZ Name: " + name);
+						System.err.println("ZZZZ Bundle Id: " + bid);
 
 						result.add(name);
 					}

Added: incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1034351&view=auto
==============================================================================
--- incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/blueprint/blueprint.xml
(added)
+++ incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/blueprint/blueprint.xml
Fri Nov 12 11:39:47 2010
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <bean id="modelInfoEnhancer" class="org.apache.aries.samples.goat.web.ServerSideClass">
+    <argument ref="modelInfoService"/>
+  </bean>
+  <reference id="modelInfoService" interface="org.apache.aries.samples.goat.api.ModelInfoService"/>
+</blueprint>
+

Added: incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/cxf/intents/blah.blah
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/cxf/intents/blah.blah?rev=1034351&view=auto
==============================================================================
--- incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/cxf/intents/blah.blah
(added)
+++ incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/cxf/intents/blah.blah
Fri Nov 12 11:39:47 2010
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:p="http://cxf.apache.org/policy"
+       xmlns:wsp="http://www.w3.org/ns/ws-policy"
+       xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xsi:schemaLocation="
+       http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+       http://www.w3.org/ns/ws-policy http://www.w3.org/2007/02/ws-policy.xsd
+       http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+       http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="intentMap" class="org.apache.cxf.dosgi.dsw.qos.IntentMap">
+       <property name="intents">
+         <map>
+           <entry key="reliability" value-ref="reliableMessaging"/>
+           <entry key="decoupled" value-ref="decoupledAddressing"/>
+         </map>
+       </property>
+    </bean>
+
+    <p:policies id="reliableMessaging">
+        <wsp:PolicyReference URI="#ReliabilityPolicy"/>
+        <wsp:PolicyReference URI="#DecoupledPolicy"/>
+        <wsp:PolicyReference URI="#AddressingPolicy"/>
+    </p:policies>
+
+    <p:policies id="decoupledAddressing">
+        <wsp:PolicyReference URI="#DecoupledPolicy"/>
+        <wsp:PolicyReference URI="#AddressingPolicy"/>
+    </p:policies>
+
+    <wsp:Policy wsu:Id="ReliabilityPolicy">
+        <wsrm-policy:RMAssertion>
+            <wsrm-policy:BaseRetransmissionInterval Milliseconds="4000"/>
+            <wsrm-policy:AcknowledgementInterval Milliseconds="2000" />
+        </wsrm-policy:RMAssertion>
+    </wsp:Policy>
+
+    <wsp:Policy wsu:Id="DecoupledPolicy">
+        <wsp:ExactlyOne>
+            <http:client DecoupledEndpoint="http://localhost:9970/decoupled_endpoint"/>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+
+    <wsp:Policy wsu:Id="AddressingPolicy"
+        xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+        <wsam:Addressing>
+            <wsp:Policy />
+        </wsam:Addressing>
+    </wsp:Policy>
+
+</beans>

Added: incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/remote-service/remote-services.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/remote-service/remote-services.xml?rev=1034351&view=auto
==============================================================================
--- incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/remote-service/remote-services.xml
(added)
+++ incubator/aries/trunk/samples-sandbox/dgoat/dgoat-web/src/main/resources/OSGI-INF/remote-service/remote-services.xml
Fri Nov 12 11:39:47 2010
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
+  <endpoint-description>
+    <property name="objectClass">
+      <array>
+        <value>org.apache.aries.samples.goat.api.ModelInfoService</value>
+      </array>
+    </property>
+    <property name="endpoint.id">http://localhost:9191/bundlectx</property>
+    <property name="service.imported.configs">org.apache.cxf.ws</property>
+    <property name="displayName">BundleContextModel</property>
+  </endpoint-description>
+</endpoint-descriptions>



Mime
View raw message