diff --git a/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/logger/AbstractLogger.java b/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/logger/AbstractLogger.java index d790ceca33f..baeed9bfb14 100644 --- a/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/logger/AbstractLogger.java +++ b/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/logger/AbstractLogger.java @@ -106,7 +106,7 @@ public void log(final int level, final String message, final Throwable ex) { if ( isLogEnabled( level ) ) { - getLogger().log(level, prefix.concat(message), ex); + getLogger().log(level, prefix.concat(" ").concat(message), ex); } } diff --git a/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java b/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java index a56abee2cf3..5a1fb944352 100644 --- a/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java +++ b/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java @@ -856,6 +856,7 @@ private Object getService() return this; } + ComponentMethods getComponentMethods() { return m_componentMethods; @@ -955,6 +956,11 @@ protected boolean unregisterService() return true; } + protected ServiceRegistration getServiceRegistration() + { + return registrationManager.getServiceRegistration(); + } + AtomicInteger getTrackingCount() { return m_trackingCount; diff --git a/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java b/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java index b263b3cc887..7107e20c835 100644 --- a/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java +++ b/osgi-r7/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java @@ -33,6 +33,7 @@ import org.apache.felix.scr.impl.inject.MethodResult; import org.apache.felix.scr.impl.inject.ReferenceMethod; import org.apache.felix.scr.impl.manager.DependencyManager.OpenStatus; +import org.apache.felix.scr.impl.metadata.DSVersion; import org.apache.felix.scr.impl.metadata.ReferenceMetadata; import org.apache.felix.scr.impl.metadata.TargetedPID; import org.osgi.framework.Bundle; @@ -561,12 +562,6 @@ public Dictionary getServiceProperties() return super.getServiceProperties(); } - final ServiceRegistration getServiceRegistration() - { - return m_componentContext == null? null: m_componentContext.getServiceRegistration(); - } - - final ServiceReference getServiceReference() { ServiceRegistration reg = getServiceRegistration(); @@ -577,6 +572,16 @@ final ServiceReference getServiceReference() return null; } + @Override + protected ServiceRegistration getServiceRegistration() + { + if ( getComponentMetadata().getDSVersion() == DSVersion.DS12Felix ) + { + return m_componentContext != null ? m_componentContext.getServiceRegistration() : null; + } + return super.getServiceRegistration(); + } + private void updateServiceRegistration() { ServiceRegistration sr = getServiceRegistration();