Package java.util

Examples of java.util.ServiceConfigurationError


    private static <K extends Serializable, V extends Cacheable<K>, G extends Serializable> ClusteredBackingCacheEntryStoreSource<K, V, G> load() {
        for (ClusteredBackingCacheEntryStoreSource<K, V, G> source: ServiceLoader.load(ClusteredBackingCacheEntryStoreSource.class, ClusteredBackingCacheEntryStoreSourceService.class.getClassLoader())) {
            return source;
        }
        throw new ServiceConfigurationError(ClusteredBackingCacheEntryStoreSource.class.getName());
    }
View Full Code Here


        try {
            en = Thread.currentThread()
                    .getContextClassLoader().getResources(name);
            url = en.nextElement();
        } catch (Exception ex) {
            throw new ServiceConfigurationError(String.format(
                    "Could not locate the resource %s on the class path.", name), ex);
        }
        if (en.hasMoreElements())
            Logger  .getLogger(Resources.class.getName())
                    .log(Level.WARNING,
View Full Code Here

     */
    public static <T> T load(final Class<T> service) {
        try {
            return ServiceLoader.load(service).iterator().next();
        } catch (NoSuchElementException ex) {
            throw new ServiceConfigurationError(String.format(Locale.ENGLISH,
                    "Could not find an implementation of the service %s on the class path.",
                    service), ex);
        }
    }
View Full Code Here

    static JmsUpdateManagerParameters load(final URL source) {
        try {
            return parse(JAXB.unmarshal(source,
                                        JmsUpdateManagerParametersCi.class));
        } catch (Exception ex) {
            throw new ServiceConfigurationError(String.format(
                    "Failed to load configuration from %s .", source),
                    ex);
        }
    }
View Full Code Here

    static MavenUpdateServerParameters load(final URL source) {
        try {
            return parse(JAXB.unmarshal(source,
                                        MavenUpdateServerParametersCi.class));
        } catch (Exception ex) {
            throw new ServiceConfigurationError(String.format(
                    "Failed to load configuration from %s .", source),
                    ex);
        }
    }
View Full Code Here

    private static SSOClusterManager load() {
        for (SSOClusterManager manager: ServiceLoader.load(SSOClusterManager.class, SSOClusterManager.class.getClassLoader())) {
            return manager;
        }
        throw new ServiceConfigurationError(SSOClusterManager.class.getName());
    }
View Full Code Here

TOP

Related Classes of java.util.ServiceConfigurationError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.