Author: pderop
Date: Sun Apr 25 09:40:38 2010
New Revision: 937773
URL: http://svn.apache.org/viewvc?rev=937773&view=rev
Log:
fixed bug in adapter annotations: the services provided by adapters were
specified as a Class, instead of a Class array.
Modified:
felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java
Modified:
felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java?rev=937773&r1=937772&r2=937773&view=diff
==============================================================================
---
felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java
(original)
+++
felix/trunk/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java
Sun Apr 25 09:40:38 2010
@@ -364,12 +364,12 @@ public class ComponentManager implements
throws ClassNotFoundException
{
Class<?> adapterImpl =
b.loadClass(parser.getString(DescriptorParam.impl));
- Class<?> adapterService =
b.loadClass(parser.getString(DescriptorParam.adapterService));
+ String[] adapterService =
parser.getStrings(DescriptorParam.adapterService, null);
Dictionary<String, String> adapterProperties =
parser.getDictionary(DescriptorParam.adapterProperties, null);
Class<?> adapteeService =
b.loadClass(parser.getString(DescriptorParam.adapteeService));
String adapteeFilter = parser.getString(DescriptorParam.adapteeFilter,
null);
- Service service = dm.createAdapterService(adapteeService,
adapteeFilter, adapterService.getName(), adapterImpl, adapterProperties);
+ Service service = dm.createAdapterService(adapteeService,
adapteeFilter, adapterService, adapterImpl, adapterProperties);
setCommonServiceParams(service, parser);
return service;
}
@@ -387,7 +387,7 @@ public class ComponentManager implements
int stateMask = parser.getInt(DescriptorParam.stateMask,
Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE);
String filter = parser.getString(DescriptorParam.filter, null);
Class<?> adapterImpl =
b.loadClass(parser.getString(DescriptorParam.impl));
- String service = parser.getString(DescriptorParam.service);
+ String service = parser.getString(DescriptorParam.service, null);
Dictionary<String, String> properties =
parser.getDictionary(DescriptorParam.properties, null);
boolean propagate =
"true".equals(parser.getString(DescriptorParam.propagate, "false"));
Service srv = dm.createBundleAdapterService(stateMask, filter,
adapterImpl, service, properties, propagate);
@@ -407,11 +407,10 @@ public class ComponentManager implements
{
String filter = parser.getString(DescriptorParam.filter, null);
Class<?> impl = b.loadClass(parser.getString(DescriptorParam.impl));
- String service = parser.getString(DescriptorParam.service);
- Class<?> serviceClass = b.loadClass(service);
+ String service = parser.getString(DescriptorParam.service, null);
Dictionary<String, String> properties =
parser.getDictionary(DescriptorParam.properties, null);
boolean propagate =
"true".equals(parser.getString(DescriptorParam.propagate, "false"));
- Service srv = dm.createResourceAdapterService(filter, null,
serviceClass.getName(), properties, impl, propagate);
+ Service srv = dm.createResourceAdapterService(filter, null, service,
properties, impl, propagate);
setCommonServiceParams(srv, parser);
return srv;
}