@Override
	public <S> Result<S> find(Class<S> serviceClass)
		throws ServiceInstantiationException {

		Result<S> result=null;
//		S provider=null;
//		Scope scope=null;

		// If it still doesn't exist, get the provider class, see what scope
		// it prefers, and create it in that scope. Syncyhronization should
		// only be necessary later in the code path when access to the shared
		// caches is necessary (most should be cached in thread-local caches
		// under steady state.
		final ServiceProviderInfo<S> info=findProviderInfo(serviceClass);
		if (info!=null) {
//			// Request scope takes precedence when present
//			if (info.isScopeAllowed(Scope.REQUEST)) {
//				scope=Scope.REQUEST;
//				provider=instantiateNonApplicationService(info,scope);
//			}
//			else
//			if (info.isScopeAllowed(Scope.APPLICATION)) {
//				scope=Scope.APPLICATION;
//				provider=instantiateApplicationService(info);
//			}
//			else
//			if (info.isScopeAllowed(Scope.CLIENT_MANAGED)) {
//				scope=Scope.CLIENT_MANAGED;
//				provider=instantiateNonApplicationService(info,scope);
//			}
//			else {
//				// Bug in my code: unaccounted for scope type
//				assert false: "Cannot create service in unknown scope";
//				throw new IllegalArgumentException(
//					"Cannot create service in unknown scope");
//			}

			Scope scope=null;

			// Request scope takes precedence when present
			if (info.isScopeAllowed(Scope.REQUEST)) {
				scope=Scope.REQUEST;
			}
			else
			if (info.isScopeAllowed(Scope.APPLICATION)) {
				scope=Scope.APPLICATION;
			}
			else
			if (info.isScopeAllowed(Scope.CLIENT_MANAGED)) {
				scope=Scope.CLIENT_MANAGED;
			}
			else {
				// Bug in my code: unaccounted for scope type
				throw new IllegalArgumentException(
					"Cannot determine scope of service in unknown scope");
			}

			final Scope _scope=scope;

			ServiceProviderFactory<S> factory=
				new ServiceProviderFactory<S>() {
					@Override
					public S createInstance() {
						S provider=null;

						// Request scope takes precedence when present
						if (_scope==Scope.REQUEST) {
							provider=
								instantiateNonApplicationService(info,_scope);
						}
						else
						if (_scope==Scope.APPLICATION) {
							provider=instantiateApplicationService(info);
						}
						else
						if (_scope==Scope.CLIENT_MANAGED) {
							provider=
								instantiateNonApplicationService(info,_scope);
						}
						else {
							// Bug in my code: unaccounted for scope type
							throw new IllegalArgumentException(
								"Cannot create service in unknown scope: "+
								_scope);
						}

						return provider;
					}
				};

			result=new Result<S>(serviceClass,factory,scope);
		}

		return result;
	}