Liran Zelkha has posted comments on this change.

Change subject: core: Make DAOs injectable
......................................................................


Patch Set 3: Verified+1

(4 comments)

https://gerrit.ovirt.org/#/c/38505/3//COMMIT_MSG
Commit Message:

Line 5: CommitDate: 2015-03-24 16:08:05 +0200
Line 6: 
Line 7: core: Make DAOs injectable
Line 8: 
Line 9: Reintroducing the DAO injectible patch, fixing the error encountered 
before
> "encountered before" is subjective :-)
Done
Line 10: 
Line 11: Change-Id: Ic426126d690ab6dedb49ef6b67deeba67661d031


https://gerrit.ovirt.org/#/c/38505/3/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacade.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacade.java:

Line 288:                 initBaseDAO((BaseDAODbFacade) dao);
Line 289:                 return (T) dao;
Line 290:             }
Line 291:         }
Line 292:         log.error("Can't find dao for " + daoType);
> i think thrown NPE would be better than returning null, since the clients o
As far as I understand existing code will return null. I wanted to keep the 
same behavior.
Line 293:         return null;
Line 294:     }
Line 295: 
Line 296:     private DbFacade() {


https://gerrit.ovirt.org/#/c/38505/3/backend/manager/modules/dal/src/test/resources/test-beans.xml
File backend/manager/modules/dal/src/test/resources/test-beans.xml:

Line 15:        <bean class="org.ovirt.engine.core.dal.dbbroker.DbFacade"/>
Line 16:        <bean 
class="org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator"/>
Line 17:        
Line 18:     <bean id="transactionManagerJPA" 
class="org.springframework.orm.jpa.JpaTransactionManager">
Line 19:         <property name="entityManagerFactory" 
ref="entityManagerFactory" />
> I don't think any of JPA aspects should be part of this code.
Done
Line 20:     </bean>
Line 21: 
Line 22:     <bean name="transactionManager"
Line 23:         
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">


https://gerrit.ovirt.org/#/c/38505/3/backend/manager/modules/vdsbroker/pom.xml
File backend/manager/modules/vdsbroker/pom.xml:

Line 107:       <scope>test</scope>
Line 108:     </dependency>
Line 109:     -->
Line 110:     <dependency>
Line 111:       <groupId>org.scala-lang</groupId>
> please replace tabs with spaces.
Done
Line 112:       <artifactId>scala-library</artifactId>
Line 113:       <version>2.10.4</version>
Line 114:     </dependency>
Line 115:   </dependencies>


-- 
To view, visit https://gerrit.ovirt.org/38505
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic426126d690ab6dedb49ef6b67deeba67661d031
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@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