felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject svn commit: r640174 - /felix/sandbox/donsez/wireadmin.sample.simpleconsumer/src/main/java/org/apache/felix/sandbox/wireadmin/sample/simpleconsumer/SimpleConsumer.java
Date Sun, 23 Mar 2008 07:57:50 GMT
Author: donsez
Date: Sun Mar 23 00:57:38 2008
New Revision: 640174

URL: http://svn.apache.org/viewvc?rev=640174&view=rev
Log:
fix bug on synchronization

Modified:
    felix/sandbox/donsez/wireadmin.sample.simpleconsumer/src/main/java/org/apache/felix/sandbox/wireadmin/sample/simpleconsumer/SimpleConsumer.java

Modified: felix/sandbox/donsez/wireadmin.sample.simpleconsumer/src/main/java/org/apache/felix/sandbox/wireadmin/sample/simpleconsumer/SimpleConsumer.java
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/wireadmin.sample.simpleconsumer/src/main/java/org/apache/felix/sandbox/wireadmin/sample/simpleconsumer/SimpleConsumer.java?rev=640174&r1=640173&r2=640174&view=diff
==============================================================================
--- felix/sandbox/donsez/wireadmin.sample.simpleconsumer/src/main/java/org/apache/felix/sandbox/wireadmin/sample/simpleconsumer/SimpleConsumer.java
(original)
+++ felix/sandbox/donsez/wireadmin.sample.simpleconsumer/src/main/java/org/apache/felix/sandbox/wireadmin/sample/simpleconsumer/SimpleConsumer.java
Sun Mar 23 00:57:38 2008
@@ -55,7 +55,7 @@
 		Dictionary registrationProperties=new Hashtable();
 		registrationProperties.put(
 				Constants.SERVICE_PID,
-				"org.apache.felix.sandbox.wireadmin.sample.simpleconsumer");
+				this.getClass().getPackage().getName());
 		registrationProperties.put(
 				WireConstants.WIREADMIN_CONSUMER_FLAVORS,
 				new Class[] {
@@ -79,7 +79,8 @@
 	 * set the new set of Wires connected to this consumer. This method is invoked by the WireAdmin
service each time a wire is created or removed
 	 * @see org.osgi.service.wireadmin.Consumer#producersConnected(org.osgi.service.wireadmin.Wire[])
 	 */
-	public void producersConnected(Wire[] wires) {
+	public synchronized void producersConnected(Wire[] wires) {
+
 		Wire[] oldWires=this.wires;
 		this.wires = wires;
 		if(wires!=null){



Mime
View raw message