Author: rickhall
Date: Mon Jun 18 06:42:55 2007
New Revision: 548356
URL: http://svn.apache.org/viewvc?view=rev&rev=548356
Log:
Modified class filtering in the service registry to be less strict, since it
was not allowing a bundle to register a service for a different version
of a class if the registering bundle also had a wire for that class.
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
URL:
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java?view=diff&rev=548356&r1=548355&r2=548356
==============================================================================
---
felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
(original)
+++
felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
Mon Jun 18 06:42:55 2007
@@ -121,20 +121,10 @@
{
try
{
- // First, try to load the class from the bundle that registered
- // the service.
- Class targetClass = ((BundleImpl) m_bundle)
- .getInfo().getCurrentModule().getClass(clazz.getName());
- if (targetClass != null)
- {
- return (targetClass == clazz);
- }
-
- // If it cannot be found from the registering bundle, then try to
load
- // from the service object or service factory class.
+ // Try to load from the service object or service factory class.
Class sourceClass = (m_factory != null)
? m_factory.getClass() : m_svcObj.getClass();
- targetClass = Util.loadClassUsingClass(sourceClass,
clazz.getName());
+ Class targetClass = Util.loadClassUsingClass(sourceClass,
clazz.getName());
return (targetClass == clazz);
}
catch (Exception ex)