Yevgeny Zaspitsky has uploaded a new change for review. Change subject: engine: remove produceLogger method (take 2) ......................................................................
engine: remove produceLogger method (take 2) Logger is instanciated statically by every class. Having that as a CDI bean is redundant. Note: Please do not revert this change without specifying a good reason for that. Change-Id: Iab86145adf4e5856287038c44cd7117564291695 Signed-off-by: Yevgeny Zaspitsky <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/BllCDIAdapter.java 1 file changed, 2 insertions(+), 20 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/38387/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/BllCDIAdapter.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/BllCDIAdapter.java index d30e95d..03d4a69 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/BllCDIAdapter.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/BllCDIAdapter.java @@ -1,8 +1,7 @@ package org.ovirt.engine.core.bll.utils; -import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; -import javax.enterprise.inject.spi.InjectionPoint; + import org.ovirt.engine.core.dal.dbbroker.DbFacade; import org.ovirt.engine.core.dao.StoragePoolDAO; import org.ovirt.engine.core.dao.VdsGroupDAO; @@ -11,8 +10,6 @@ import org.ovirt.engine.core.dao.network.InterfaceDao; import org.ovirt.engine.core.dao.network.NetworkClusterDao; import org.ovirt.engine.core.dao.network.NetworkDao; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * This class is made to keep all producers of bll dependencies, generally singletons from other jars in one place for the @@ -24,23 +21,8 @@ * Producers could be declared either by a field or by a method, to get more control on the production of an instance * * There is no need to instantiate this class and there is no visible usage to it but to the dependency scanner - * - * */ -@ApplicationScoped public class BllCDIAdapter { - - /** - * this producer enables injection of Logger instance. Its not intended to be used as protected instance as the - * runtime instance is the declaring class so use directly as a private member. - * <code> - * @Inject private Logger log; </code> - * @param injectionPoint - */ - @Produces - public Logger produceLogger(InjectionPoint injectionPoint) { - return LoggerFactory.getLogger(injectionPoint.getMember().getDeclaringClass()); - } @Produces private NetworkDao produceNetworkDao(DbFacade dbFacade) { @@ -77,7 +59,7 @@ return dbFacade.getHostNetworkQosDao(); } - protected BllCDIAdapter() { + private BllCDIAdapter() { // hide me } } -- To view, visit https://gerrit.ovirt.org/38387 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab86145adf4e5856287038c44cd7117564291695 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yevgeny Zaspitsky <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
