// Create remote service properties
Map remoteServiceProperties = copyNonReservedProperties(
serviceReference, (Map<String, Object>) overridingProperties,
new TreeMap<String, Object>(String.CASE_INSENSITIVE_ORDER));
IRemoteServiceContainerAdapter containerAdapter = rsContainer
.getContainerAdapter();
// Register remote service via ECF container adapter to create
// remote service registration
IRemoteServiceRegistration remoteRegistration = null;
if (containerAdapter instanceof IOSGiRemoteServiceContainerAdapter) {
IOSGiRemoteServiceContainerAdapter osgiContainerAdapter = (IOSGiRemoteServiceContainerAdapter) containerAdapter;
remoteRegistration = osgiContainerAdapter.registerRemoteService(
exportedInterfaces, serviceReference, PropertiesUtil
.createDictionaryFromMap(remoteServiceProperties));
} else {
Object service = AccessController
.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
return getClientBundleContext().getService(
serviceReference);
}
});
remoteRegistration = containerAdapter.registerRemoteService(
exportedInterfaces, service, PropertiesUtil
.createDictionaryFromMap(remoteServiceProperties));
}
endpointDescriptionProperties.put(