Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2011-08-21 19:50:10 -0400
committerslewis2011-08-21 19:50:10 -0400
commit9d7971947fbf6734427f2af06c8d027f1479ad88 (patch)
tree9329e7499d7d4971f9aa4921b18c90c02baf9df9
parentedccd1ae619681604b2b664002dc74b39e7f8dde (diff)
downloadorg.eclipse.ecf-9d7971947fbf6734427f2af06c8d027f1479ad88.tar.gz
org.eclipse.ecf-9d7971947fbf6734427f2af06c8d027f1479ad88.tar.xz
org.eclipse.ecf-9d7971947fbf6734427f2af06c8d027f1479ad88.zip
fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=349173
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters7
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/META-INF/MANIFEST.MF2
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java8
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java2
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java11
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java2
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java5
-rw-r--r--tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution/META-INF/MANIFEST.MF10
8 files changed, 29 insertions, 18 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters b/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters
index ccbc33c50..1c1e42412 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.ecf.remoteservice" version="2">
+ <resource path="src/org/eclipse/ecf/remoteservice/Constants.java" type="org.eclipse.ecf.remoteservice.Constants">
+ <filter comment="Added to allow remote services to expose async proxies outside of original package." id="1211105284">
+ <message_arguments>
+ <message_argument value="SERVICE_ASYNC_PROXY"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/ecf/remoteservice/util/RemoteFilterImpl.java" type="org.eclipse.ecf.remoteservice.util.RemoteFilterImpl">
<filter comment="remote service filter can implement osgi Filter" id="574660632">
<message_arguments>
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.remoteservice/META-INF/MANIFEST.MF
index e6d24d4bb..157203800 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.remoteservice;singleton:=true
-Bundle-Version: 6.0.100.qualifier
+Bundle-Version: 6.0.200.qualifier
Bundle-Activator: org.eclipse.ecf.internal.remoteservice.Activator
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java
index 05c223291..997b62ca6 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java
@@ -187,7 +187,7 @@ public abstract class AbstractRemoteService implements IRemoteService, Invocatio
try {
return Class.forName(proxyClassName, true, cl);
} catch (ClassNotFoundException e) {
- logInfo("No async remote service interface found with name=" + proxyClassName + " for remote service class=" + c.getName(), e); //$NON-NLS-1$ //$NON-NLS-2$
+ //logInfo("No async remote service interface found with name=" + proxyClassName + " for remote service class=" + c.getName(), e); //$NON-NLS-1$ //$NON-NLS-2$
return null;
} catch (NoClassDefFoundError e) {
logWarning("Async remote service interface with name=" + proxyClassName + " could not be loaded for proxy service class=" + c.getName(), e); //$NON-NLS-1$ //$NON-NLS-2$
@@ -196,6 +196,12 @@ public abstract class AbstractRemoteService implements IRemoteService, Invocatio
}
protected String convertInterfaceNameToAsyncInterfaceName(String interfaceName) {
+ if (interfaceName == null)
+ return null;
+ String asyncProxyName = (String) getRemoteServiceReference().getProperty(Constants.SERVICE_ASYNC_PROXY + interfaceName);
+ if (asyncProxyName != null)
+ return asyncProxyName;
+ // If a value has been specified by the ServiceProperty
return interfaceName + IAsyncRemoteServiceProxy.ASYNC_INTERFACE_SUFFIX;
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
index 23196525b..0f4f576d3 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
@@ -111,6 +111,8 @@ public interface Constants {
*/
public static final String SERVICE_PREVENT_RSPROXY = "ecf.rsvc.norsproxy"; //$NON-NLS-1$
+ public static final String SERVICE_ASYNC_PROXY = "ecf.rsvc.async.proxy_"; //$NON-NLS-1$
+
/**
* @deprecated
*/
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
index 6c59b63c8..179a771fc 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
@@ -30,7 +30,6 @@ import org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceReference;
@@ -69,7 +68,7 @@ public class Activator implements BundleActivator {
private Object saxParserFactoryTrackerLock = new Object();
private ServiceTracker saxParserFactoryTracker;
- private static final String RSA_PROXY_BUNDLE_SYMBOLIC_ID = "org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy";
+ private static final String RSA_PROXY_BUNDLE_SYMBOLIC_ID = "org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy"; //$NON-NLS-1$
private BundleContext proxyServiceFactoryBundleContext;
@@ -84,9 +83,9 @@ public class Activator implements BundleActivator {
}
}
if (proxyServiceFactoryBundleContext == null)
- throw new IllegalStateException("RSA Proxy bundle (symbolic id=='"
+ throw new IllegalStateException("RSA Proxy bundle (symbolic id=='" //$NON-NLS-1$
+ RSA_PROXY_BUNDLE_SYMBOLIC_ID
- + "') cannot be found, so RSA cannot be started");
+ + "') cannot be found, so RSA cannot be started"); //$NON-NLS-1$
}
private void stopProxyServiceFactoryBundle() {
@@ -238,8 +237,8 @@ public class Activator implements BundleActivator {
return false;
Bundle systemBundle = context.getBundle(0);
String systemBSN = systemBundle.getSymbolicName();
- if ("org.eclipse.osgi".equals(systemBSN)) {
- Version fixedVersion = new Version("3.7.0");
+ if ("org.eclipse.osgi".equals(systemBSN)) { //$NON-NLS-1$
+ Version fixedVersion = new Version("3.7.0"); //$NON-NLS-1$
// running on equinox; check the version
Version systemVersion = systemBundle.getVersion();
if (systemVersion.compareTo(fixedVersion) < 0)
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java
index f52e00976..cb201ee7f 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/PropertiesUtil.java
@@ -245,7 +245,7 @@ public class PropertiesUtil {
// skip dotted (private) properties (R4.2 enterprise spec. table 122.1)
public static boolean isPrivateProperty(String key) {
- return (key.startsWith(".")); //$NON-NLS-N$
+ return (key.startsWith(".")); //$NON-NLS-1$
}
public static boolean isReservedProperty(String key) {
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 8d99cca58..468899516 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
@@ -962,9 +962,8 @@ public class RemoteServiceAdmin implements
EndpointDescription endpointDescription) {
EventAdmin eventAdmin = getEventAdmin();
if (eventAdmin == null) {
- logError(
- "RemoteServiceAdmin.postEvent", "No event admin service available to post event=" //$NON-NLS-1$ //$NON-NLS-2$
- + event);
+ //logWarning("RemoteServiceAdmin.postEvent", "No event admin service available to post event=" //$NON-NLS-1$ //$NON-NLS-2$
+ // + event);
return;
}
int eventType = event.getType();
diff --git a/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution/META-INF/MANIFEST.MF
index 42c5ca9c3..a3f3ccd17 100644
--- a/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution/META-INF/MANIFEST.MF
+++ b/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution/META-INF/MANIFEST.MF
@@ -15,11 +15,9 @@ Require-Bundle: org.eclipse.ecf.tests,
org.eclipse.ecf.remoteservice;bundle-version="3.0.0",
org.eclipse.ecf;bundle-version="3.0.0",
org.eclipse.ecf.tests.remoteservice;bundle-version="2.0.0",
- org.junit,
- org.eclipse.equinox.common,
org.eclipse.equinox.concurrent;bundle-version="1.0.0",
- org.eclipse.ecf.osgi.services.remoteserviceadmin;bundle-version="1.0.0",
- org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy;bundle-version="1.0.0",
- org.eclipse.osgi.services.remoteserviceadmin;bundle-version="1.0.0"
+ org.junit;bundle-version="4.8.2",
+ org.eclipse.equinox.common;bundle-version="3.6.0"
Export-Package: org.eclipse.ecf.tests.internal.osgi.services.distribution;x-internal:=true,
- org.eclipse.ecf.tests.osgi.services.distribution
+ org.eclipse.ecf.tests.osgi.services.distribution,
+ org.eclipse.ecf.tests.osgi.services.distribution.async

Back to the top