diff options
author | slewis | 2014-06-17 19:31:52 +0000 |
---|---|---|
committer | slewis | 2014-06-17 19:31:52 +0000 |
commit | 72b3a79be3a8ce2372721e75d569275e57ca43fe (patch) | |
tree | c67c56017a423784c46b72772c08834e0ce0193b | |
parent | be9bb742f88a0e8313580db8c0ff8285a6502e07 (diff) | |
download | org.eclipse.ecf-72b3a79be3a8ce2372721e75d569275e57ca43fe.tar.gz org.eclipse.ecf-72b3a79be3a8ce2372721e75d569275e57ca43fe.tar.xz org.eclipse.ecf-72b3a79be3a8ce2372721e75d569275e57ca43fe.zip |
Removed reuse of ExportEndpoint instances for
RemoteServiceAdmin.exportService. Reason: This reuse, which was
specified in the RSA 1.0/R5 spec, has been removed in RSA 1.1/R6
Change-Id: I212826dd088a22677372fc90eec638e51fa3dcc3
-rw-r--r-- | osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java | 69 |
1 files changed, 27 insertions, 42 deletions
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java index 17e61060c..c19ae1ab0 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java @@ -321,51 +321,36 @@ public class RemoteServiceAdmin implements synchronized (exportedRegistrations) { // For all selected containers for (int i = 0; i < rsContainers.length; i++) { + Map endpointDescriptionProperties = createExportEndpointDescriptionProperties( + serviceReference, + (Map<String, Object>) overridingProperties, + exportedInterfaces, serviceIntents, + rsContainers[i]); + // otherwise, actually export the service to create + // a new ExportEndpoint and use it to create a new + // ExportRegistration + EndpointDescription endpointDescription = new EndpointDescription( + serviceReference, endpointDescriptionProperties); + + checkEndpointPermission(endpointDescription, + EndpointPermission.EXPORT); + ExportRegistration exportRegistration = null; - // If we've already got an export endpoint - // for this service reference/containerID combination, - // then create an ExportRegistration that uses the - // endpoint - ExportEndpoint exportEndpoint = findExistingExportEndpoint( - serviceReference, rsContainers[i] - .getContainer().getID()); - // If we've already got one, then create a new - // ExportRegistration for it and we're done - if (exportEndpoint != null) - exportRegistration = new ExportRegistration( - exportEndpoint); - else { - Map endpointDescriptionProperties = createExportEndpointDescriptionProperties( - serviceReference, - (Map<String, Object>) overridingProperties, - exportedInterfaces, serviceIntents, - rsContainers[i]); - // otherwise, actually export the service to create - // a - // new - // ExportEndpoint and use it to create a new - // ExportRegistration - EndpointDescription endpointDescription = new EndpointDescription( - serviceReference, - endpointDescriptionProperties); - checkEndpointPermission(endpointDescription, - EndpointPermission.EXPORT); - try { - // Check security access for export - // Actually do the export and return export - // registration - exportRegistration = exportService( - serviceReference, overridingProperties, - exportedInterfaces, rsContainers[i], - endpointDescriptionProperties); - } catch (Exception e) { - exportRegistration = new ExportRegistration(e, - endpointDescription); - } + try { + // Actually do the export and return export + // registration + exportRegistration = exportService( + serviceReference, overridingProperties, + exportedInterfaces, rsContainers[i], + endpointDescriptionProperties); + } catch (Exception e) { + exportRegistration = new ExportRegistration(e, + endpointDescription); } - addExportRegistration(exportRegistration); - // We add it to the results in either case + + addExportRegistration(exportRegistration); + // We add it to the results in either success or error case resultRegistrations.add(exportRegistration); } } |