X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=trunk%2Fsystem%2Fspring%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fspring%2FRequiredServiceBean.java;h=abd5115ea68ab78384175e974280d43fa606fdee;hb=7044d9225b43feadb546d81a99cc448124432cba;hp=88ebed1f39b600fd38be8790b6aefe068de0c8ba;hpb=d382c39636e544269b26af6eb38d957d869733b7;p=utils diff --git a/trunk/system/spring/src/main/java/org/wamblee/system/spring/RequiredServiceBean.java b/trunk/system/spring/src/main/java/org/wamblee/system/spring/RequiredServiceBean.java index 88ebed1f..abd5115e 100644 --- a/trunk/system/spring/src/main/java/org/wamblee/system/spring/RequiredServiceBean.java +++ b/trunk/system/spring/src/main/java/org/wamblee/system/spring/RequiredServiceBean.java @@ -18,6 +18,7 @@ package org.wamblee.system.spring; import org.springframework.beans.factory.FactoryBean; import org.wamblee.system.core.ProvidedInterface; import org.wamblee.system.core.RequiredInterface; +import org.wamblee.system.core.RequiredInterfaces; import org.wamblee.system.core.SystemAssemblyException; /** @@ -35,19 +36,20 @@ class RequiredServiceBean implements FactoryBean { * @param aId Id of the bean in the service registry. */ public RequiredServiceBean(String aId) { - RequiredInterface[] required = SpringComponent.THIS.get().getRequiredServices(); + RequiredInterfaces required = SpringComponent.THIS.get().getRequiredInterfaces(); for ( RequiredInterface intf: required) { if ( intf.getName().equals(aId)) { _required = intf; return; } } - throw new SystemAssemblyException("Cannot resolve provided component '" + aId + "'"); + throw new SystemAssemblyException("Cannot resolve required component '" + aId + "'"); } @Override public Object getObject() throws Exception { - return _required.getImplementation(Object.class); + return SpringComponent.SCOPE.get().getInterfaceImplementation( + _required.getProvider(), Object.class); } @Override