public ServiceDiscoverer getServiceDiscoverer() { if (discoverer != null) { return discoverer; } try { // FIXME: This is a hack to trigger the activation of the extensibility-equinox bundle in OSGi Class.forName("org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer"); if (discoverer != null) { return discoverer; } } catch (Throwable e) { } discoverer = new ContextClassLoaderServiceDiscoverer(getClass().getClassLoader()); return discoverer; }
public ServiceDeclaration getServiceDeclaration(String name) throws IOException { Collection<ServiceDeclaration> declarations = getServiceDeclarations(name); if (declarations.isEmpty()) { return null; } else { return declarations.iterator().next(); } }
for (final URL url : getResources(name)) { if (debug) { logger.fine("Reading service provider file: " + url.toExternalForm());
for (final URL url : getResources(name)) { if (debug) { logger.fine("Reading service provider file: " + url.toExternalForm());
public ServiceDeclaration getServiceDeclaration(String name) throws IOException { Collection<ServiceDeclaration> declarations = getServiceDeclarations(name); if (declarations.isEmpty()) { return null; } else { return declarations.iterator().next(); } }
public ServiceDiscoverer getServiceDiscoverer() { if (discoverer != null) { return discoverer; } try { // FIXME: This is a hack to trigger the activation of the extensibility-equinox bundle in OSGi Class.forName("org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer"); if (discoverer != null) { return discoverer; } } catch (Throwable e) { } discoverer = new ContextClassLoaderServiceDiscoverer(getClass().getClassLoader()); return discoverer; }