summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-24 23:01:02 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-24 23:01:02 +0000
commit1fa4c95f46429e17f6c15c4785924aa5e6a64d64 (patch)
treeb4b73ec23fa20e8546d2d3bf5cf3ab3a7e60b8ce /branches
parent8bec3f9b64a649ca3cc6e7f458e6a2242841b44f (diff)
Minor clean up for the extensibility
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@707777 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches')
-rw-r--r--branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java7
-rw-r--r--branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java5
-rw-r--r--branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java13
3 files changed, 3 insertions, 22 deletions
diff --git a/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java b/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java
index 8c07caf0e4..3d33782a29 100644
--- a/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java
+++ b/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java
@@ -298,11 +298,4 @@ public class EquinoxServiceDiscoverer implements ServiceDiscoverer {
return descriptors;
}
- public Object newFactoryClassInstance(String name) throws SecurityException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException {
- Class<?> factoryClass = Class.forName(name, false, getClass().getClassLoader());
- Method newInstanceMethod = factoryClass.getMethod("newInstance");
- Object factory = newInstanceMethod.invoke(null);
- return factory;
- }
-
}
diff --git a/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java b/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java
index 1cb1d09f8d..0c7eaec70b 100644
--- a/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java
+++ b/branches/sca-equinox/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java
@@ -28,16 +28,15 @@ import org.osgi.framework.BundleContext;
/**
* The Bundle Activator that creates the Equinox-based service discoverer
*
- * @version $Rev: $ $Date: $
+ * @version $Rev$ $Date$
*/
public class EquinoxServiceDiscoveryActivator implements BundleActivator {
private static Logger logger = Logger.getLogger(EquinoxServiceDiscoveryActivator.class.getName());
public void start(BundleContext context) throws Exception {
- logger.info("Installing service discovery");
EquinoxServiceDiscoverer discoverer = new EquinoxServiceDiscoverer(context);
ServiceDiscovery.getInstance().setServiceDiscoverer(discoverer);
- logger.info("Installed service discovery");
+ logger.info("Equinox-based service discoverer is now configured.");
}
public void stop(BundleContext context) throws Exception {
diff --git a/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java b/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
index e78cb136d3..ff8f2399df 100644
--- a/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
+++ b/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
@@ -20,8 +20,6 @@
package org.apache.tuscany.sca.extensibility;
import java.io.IOException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
import java.util.Set;
import java.util.logging.Logger;
@@ -70,16 +68,7 @@ public class ServiceDiscovery implements ServiceDiscoverer {
}
public ServiceDeclaration getFirstServiceDeclaration(final String name) throws IOException {
- // Try System property first
- String className = AccessController.doPrivileged(new PrivilegedAction<String>() {
- public String run() {
- return System.getProperty(name);
- }
- });
- if (className == null) {
- className = name;
- }
- ServiceDeclaration service = getServiceDiscoverer().getFirstServiceDeclaration(className);
+ ServiceDeclaration service = getServiceDiscoverer().getFirstServiceDeclaration(name);
return service;
}