Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2015-08-05 04:18:36 +0000
committerslewis2015-08-05 04:18:36 +0000
commit3fdc25508ef15f1c4d93b209ac74eff8024fc8ff (patch)
treedb34813dcebef3acaf24641cb1fcb40d1b48ddc8
parent592f7ab31fb8251c804e9686b65f28f8c3ab308d (diff)
downloadorg.eclipse.ecf-3fdc25508ef15f1c4d93b209ac74eff8024fc8ff.tar.gz
org.eclipse.ecf-3fdc25508ef15f1c4d93b209ac74eff8024fc8ff.tar.xz
org.eclipse.ecf-3fdc25508ef15f1c4d93b209ac74eff8024fc8ff.zip
Fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=474267
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java11
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/messages.properties16
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java18
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java2
5 files changed, 31 insertions, 18 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java
index e5a157437..101a7df44 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java
@@ -305,7 +305,16 @@ public class EndpointDiscoveryView extends ViewPart {
.getEndpointDescription();
ImportRegistration reg = (ImportRegistration) rsa
.importService(ed);
- // Check if import exception
+ if (reg == null) {
+ logError(
+ Messages.EndpointDiscoveryView_ERROR_MSG_RSA_IMPORTSERVICE_FAILED,
+ new Exception("Import Registration Is Null"));
+ showMessage(Messages.EndpointDiscoveryView_ERROR_MSG_RSA_IMPORTSERVICE_FAILED_PREFIX
+ + "Import Registration Is Null"
+ + Messages.EndpointDiscoveryView_ERROR_MSG_SUFFIX);
+ return;
+ }
+ // Check if import exception in returned registration
Throwable exception = reg.getException();
if (exception != null) {
logError(
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/messages.properties b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/messages.properties
index 5641165c3..c8b4eee3b 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/messages.properties
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/messages.properties
@@ -18,16 +18,16 @@ EndpointDiscoveryGroupNode_DISCOVERY_SERVICE_TYPE_ID=Service Type
EndpointDiscoveryView_CLOSE_IMPORTED_REMOTE_SERVICE_TT=Unimport the Previously-Imported Remote Service
EndpointDiscoveryView_COPY_PROPERTY_NAME=Copy Property Name
EndpointDiscoveryView_COPY_PROPERTY_VALUE=Copy Property Value
-EndpointDiscoveryView_ENDPOINT_MSGBOX_TITLE=EndpointDescriptionNode Discovery
+EndpointDiscoveryView_ENDPOINT_MSGBOX_TITLE=Endpoint Error
EndpointDiscoveryView_ENDPOINT_ROOT_NAME=Discovered Endpoints
-EndpointDiscoveryView_ERROR_MSG_CANNOT_CLOSE_IR=Cannot unimport imported service
-EndpointDiscoveryView_ERROR_MSG_CANNOT_CLOSE_IR_PREFIX=Cannot imported service exception:
+EndpointDiscoveryView_ERROR_MSG_CANNOT_CLOSE_IR=Cannot unimport service
+EndpointDiscoveryView_ERROR_MSG_CANNOT_CLOSE_IR_PREFIX=Cannot close imported service:
EndpointDiscoveryView_ERROR_MSG_ENDPOINT_PARSING_FAILED=Endpoint description parsing failed
-EndpointDiscoveryView_ERROR_MSG_ENDPOINT_PARSING_FAILED_PREFIX=Endpoint description parsing failed with exception
-EndpointDiscoveryView_ERROR_MSG_RSA_IMPORTSERVICE_FAILED=RSA importService failed
-EndpointDiscoveryView_ERROR_MSG_RSA_IMPORTSERVICE_FAILED_PREFIX=RSA importService failed with exception:
-EndpointDiscoveryView_ERROR_MSG_RSA_IS_NULL=RSA is null, so cannot import
-EndpointDiscoveryView_ERROR_MSG_RSA_START_PREFIX=RSA Start failed with exception:
+EndpointDiscoveryView_ERROR_MSG_ENDPOINT_PARSING_FAILED_PREFIX=Endpoint description parsing failed
+EndpointDiscoveryView_ERROR_MSG_RSA_IMPORTSERVICE_FAILED=ImportService failed
+EndpointDiscoveryView_ERROR_MSG_RSA_IMPORTSERVICE_FAILED_PREFIX=ImportService failed:
+EndpointDiscoveryView_ERROR_MSG_RSA_IS_NULL=RSA is not available, so cannot import
+EndpointDiscoveryView_ERROR_MSG_RSA_START_PREFIX=RSA Start failed:
EndpointDiscoveryView_ERROR_MSG_SUFFIX=. See Error Log for details.
EndpointDiscoveryView_ERROR_RSA_START_FAILED=RSA start failed
EndpointDiscoveryView_IMPORT_REMOTE_SERVICE=Import Remote Service
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 fd59711d2..6eec30b8c 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
@@ -403,6 +403,7 @@ public class RemoteServiceAdmin implements
}
// Select the rsContainer to handle the endpoint description
IRemoteServiceContainer rsContainer = null;
+ ImportRegistration importRegistration = null;
try {
rsContainer = AccessController
.doPrivileged(new PrivilegedExceptionAction<IRemoteServiceContainer>() {
@@ -414,11 +415,13 @@ public class RemoteServiceAdmin implements
});
} catch (PrivilegedActionException e) {
logError("importService","Unexpected exception in selectConsumerContainer",e.getException()); //$NON-NLS-1$ //$NON-NLS-2$
- // As specified in section 122.5.2, return null
- return null;
+ importRegistration = new ImportRegistration(ed, e.getException());
+ } catch (Exception e) {
+ logError("importService","Unexpected exception in selectConsumerContainer",e); //$NON-NLS-1$ //$NON-NLS-2$
+ importRegistration = new ImportRegistration(ed, e);
}
// If none found, log an error and return null
- if (rsContainer == null) {
+ if (rsContainer == null && importRegistration == null) {
String errorMessage = "No remote service container selected for endpoint=" //$NON-NLS-1$
+ endpointDescription
+ ". Remote service NOT IMPORTED"; //$NON-NLS-1$
@@ -429,11 +432,12 @@ public class RemoteServiceAdmin implements
// If one selected then import the service to create an import
// registration
- ImportRegistration importRegistration = null;
synchronized (importedRegistrations) {
- ImportEndpoint importEndpoint = findImportEndpoint(ed);
- importRegistration = ((importEndpoint != null) ? new ImportRegistration(
- importEndpoint) : importService(ed, rsContainer));
+ if (importRegistration == null) {
+ ImportEndpoint importEndpoint = findImportEndpoint(ed);
+ importRegistration = ((importEndpoint != null) ? new ImportRegistration(importEndpoint)
+ : importService(ed, rsContainer));
+ }
addImportRegistration(importRegistration);
}
// publish import event
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
index ea7c60795..511836bab 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.provider.r_osgi;singleton:=true
-Bundle-Version: 3.5.200.qualifier
+Bundle-Version: 3.5.300.qualifier
Import-Package: org.eclipse.ecf.core.util.reflection,
org.eclipse.ecf.remoteservice.asyncproxy;version="1.0.0",
org.eclipse.equinox.concurrent.future;version="1.0.0",
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
index 8bd2a0a9e..de54fe980 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
@@ -106,7 +106,7 @@ public final class R_OSGiContainerInstantiator implements IContainerInstantiator
return new R_OSGiWSRemoteServiceContainer(remoteOSGiService, containerID);
else
return new R_OSGiRemoteServiceContainer(remoteOSGiService, containerID);
- } catch (IDCreateException e) {
+ } catch (Exception e) {
throw new ContainerCreateException("Could not create R_OSGI ID", e); //$NON-NLS-1$
}
}

Back to the top