diff options
2 files changed, 18 insertions, 0 deletions
diff --git a/container-disc/src/main/java/com/yahoo/container/jdisc/RestrictedBundleContext.java b/container-disc/src/main/java/com/yahoo/container/jdisc/RestrictedBundleContext.java index 8fad9a48376..3f61442e7e4 100644 --- a/container-disc/src/main/java/com/yahoo/container/jdisc/RestrictedBundleContext.java +++ b/container-disc/src/main/java/com/yahoo/container/jdisc/RestrictedBundleContext.java @@ -45,6 +45,22 @@ public class RestrictedBundleContext implements BundleContext { } @Override + public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> serviceReference) { + if (wrapped == null) { + return null; + } + return wrapped.getServiceObjects(serviceReference); + } + + @Override + public <S> ServiceRegistration<S> registerService(Class<S> aClass, ServiceFactory<S> serviceFactory, Dictionary<String, ?> dictionary) { + if (wrapped == null) { + return null; + } + return wrapped.registerService(aClass, serviceFactory, dictionary); + } + + @Override public ServiceReference<?>[] getServiceReferences(String localHostname, String localHostname2) throws InvalidSyntaxException { if (wrapped == null) { return new ServiceReference<?>[0]; diff --git a/standalone-container/src/main/scala/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.scala b/standalone-container/src/main/scala/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.scala index 5a41462cb48..3f3164a6059 100644 --- a/standalone-container/src/main/scala/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.scala +++ b/standalone-container/src/main/scala/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.scala @@ -198,6 +198,8 @@ final class ClassLoaderOsgiFramework extends OsgiFramework { override def getDataFile(filename: String) = throw new UnsupportedOperationException override def createFilter(filter: String) = throw new UnsupportedOperationException + override def registerService[S](aClass: Class[S], serviceFactory: ServiceFactory[S], dictionary: Dictionary[String, _]): ServiceRegistration[S] = throw new UnsupportedOperationException; + override def getServiceObjects[S](serviceReference: ServiceReference[S]): ServiceObjects[S] = throw new UnsupportedOperationException; } } |