RestPublisher's CacheLoader continuous WARN log for SeriesServiceRemoteImpl

Description

The Engage server continually posts this log line:
WARN | (RestPublisher$1:150) - No service reference found for class org.opencastproject.series.remote.SeriesServiceRemoteImpl

From this snippet:

1 2 3 4 5 6 7 8 9 10 11 12 private final CacheLoader<Class<?>, Object> servicePathLoader = new CacheLoader<Class<?>, Object>() { @Override public Object load(Class<?> clazz) { ServiceReference<?> ref = componentContext.getBundleContext().getServiceReference(clazz.getName()); if (ref == null) { logger.warn("No service reference found for class {}", clazz.getName()); return nullToken; } String servicePath = (String) ref.getProperty(SERVICE_PATH_PROPERTY); return StringUtils.isBlank(servicePath) ? nullToken : servicePath; } };

Proposed Solution:
The other Opencast REST classes provide their class name in their OSGI-INF scr component files. The RestPublisher uses this information to mange endpoints. The series-remote does not provide its class name in its scr component file. I believe this is an oversight: the series-remote is the only remote I know that implements the service Impl and also provides a REST endpoint. Most remotes do not provide the REST endpoint. The Engage server's RestPublisher stops the WARN logs when the SeriesServiceRemoteImpl provides it's class name in the scr component file. I cannot find any negatives for adding the remote service REST class name in addition to the api that it implements.

From the current:

1 2 3 <service> <provide interface="org.opencastproject.series.api.SeriesService" /> </service>

To declaring both interfaces:

1 2 3 4 <service> <provide interface="org.opencastproject.series.api.SeriesService" /> <provide interface="org.opencastproject.series.remote.SeriesServiceRemoteImpl" /> </service>

I will make a pull.

Steps to reproduce

None

Status

Assignee

Former user

Reporter

Former user

Criticality

None

Tags (folksonomy)

None

Affects versions

3.0

Priority

Minor