Liran Zelkha has posted comments on this change.

Change subject: core: Infra for injecting beans in external JARs
......................................................................


Patch Set 2:

(7 comments)

http://gerrit.ovirt.org/#/c/37439/2/backend/manager/dependencies/common/pom.xml
File backend/manager/dependencies/common/pom.xml:

Line 379:       <version>${jackson.version}</version>
Line 380:     </dependency>
Line 381: 
Line 382:     <dependency>
Line 383:       <groupId>org.apache.deltaspike.core</groupId>
> please check if we have that delta spike version in brew
Of course. Already run a developer job with it
Line 384:       <artifactId>deltaspike-core-api</artifactId>
Line 385:       <version>${deltaspike.version}</version>
Line 386:     </dependency>
Line 387: 


http://gerrit.ovirt.org/#/c/37439/2/backend/manager/modules/bll/pom.xml
File backend/manager/modules/bll/pom.xml:

Line 164:         <scope>provided</scope>
Line 165:      </dependency>
Line 166:      <dependency>
Line 167:          <groupId>org.scala-lang</groupId>
Line 168:          <artifactId>scala-library</artifactId>
> weird no? 
Done
Line 169:          <version>2.10.4</version>
Line 170:      </dependency>
Line 171:      <dependency>
Line 172:          <groupId>org.springframework.boot</groupId>


http://gerrit.ovirt.org/#/c/37439/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ModuleConfigurationExtension.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ModuleConfigurationExtension.java:

Line 21: import org.reflections.Reflections;
Line 22: import org.slf4j.Logger;
Line 23: import org.slf4j.LoggerFactory;
Line 24: 
Line 25: import com.google.common.base.Strings;
> if that's the only use for guava dependency than I'd rather
We already have guava (my patch didn't add it) - so why not use it?
Line 26: 
Line 27: public class ModuleConfigurationExtension implements Extension {
Line 28:     private static final Logger log = 
LoggerFactory.getLogger(ModuleConfigurationExtension.class);
Line 29:     private final Map<String, AnnotatedType<Object>> beans = new 
HashMap<>();


Line 29:     private final Map<String, AnnotatedType<Object>> beans = new 
HashMap<>();
Line 30: 
Line 31:     /**
Line 32:      * This method is automatically activated by CDI, and loads all 
classes in the org.ovirt package that has NAMED or
Line 33:      * SINGLETON annotations.
> what about support for other scopes? like ApplicationScope and so on
In the future I guess
Line 34:      * @param bdd
Line 35:      */
Line 36:     void readAllConfigurations(final @Observes BeforeBeanDiscovery 
bdd, BeanManager bm) {
Line 37:         log.info("Starting to load beans from modules");


Line 32:      * This method is automatically activated by CDI, and loads all 
classes in the org.ovirt package that has NAMED or
Line 33:      * SINGLETON annotations.
Line 34:      * @param bdd
Line 35:      */
Line 36:     void readAllConfigurations(final @Observes BeforeBeanDiscovery 
bdd, BeanManager bm) {
> we need to make sure we remove the beans.xml from dal otherwise we'd have p
It's not there, so no problem.
Line 37:         log.info("Starting to load beans from modules");
Line 38:         addBeansFromPackage(bdd, bm, "org.ovirt.engine.core.dal");
Line 39:         addBeansFromPackage(bdd, bm, "org.ovirt.engine.core.dao");
Line 40:     }


Line 57: isNullOrEmpty
> you can use apache.StringUtils its already in the dep tree
See above about guava


http://gerrit.ovirt.org/#/c/37439/2/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/SimpleDependecyInjector.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/SimpleDependecyInjector.java:

Line 62:      * @param clazz
Line 63:      * @param <T>
Line 64:      * @return
Line 65:      */
Line 66:     @SuppressWarnings("unchecked")
> I guess not realated
There was a warning, and no reason not to remove it
Line 67:     public <T> T get(Class<T> clazz) {
Line 68:         return (T) map.get(clazz.getName());
Line 69:     }
Line 70: 


-- 
To view, visit http://gerrit.ovirt.org/37439
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3b3c2c57178b5df4f98b4191ac9a06f9129414d0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to