Roy Golan has posted comments on this change.

Change subject: core: Inject TransactionSupport instead of JNDI lookups
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.ovirt.org/#/c/35637/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterSyncJob.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterSyncJob.java:

Line 205:             }
Line 206:         });
Line 207:     }
Line 208: 
Line 209:     protected TransactionSupport getTransactionSupport() {
> Is this the only place besides Commands that has transactions ?
no. try VdsBroker.
Line 210:         return Injector.get(TransactionSupport.class);
Line 211:     }
Line 212: 
Line 213:     /**


http://gerrit.ovirt.org/#/c/35637/3/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommandTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommandTest.java:

Line 84: 
Line 85:     private StorageDomain domain = null;
Line 86: 
Line 87: //    @ClassRule
Line 88: //    public static MockEJBStrategyRule mockEjbRule = new 
MockEJBStrategyRule();
> Remove, don't comment out
indeed that's junk
Line 89: 
Line 90:     StorageDomainPoolParametersBase params = new 
StorageDomainPoolParametersBase(Guid.newGuid(), Guid.newGuid());
Line 91:     DeactivateStorageDomainCommand<StorageDomainPoolParametersBase> 
cmd =
Line 92:             spy(new 
DeactivateStorageDomainCommand<StorageDomainPoolParametersBase>(params));


http://gerrit.ovirt.org/#/c/35637/3/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/transaction/TransactionSupport.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/transaction/TransactionSupport.java:

Line 210:     /**
Line 211:      * Forces "REQUIRES_NEW" and executes given code in that scope
Line 212:      */
Line 213: 
Line 214:     public static <T> T executeInNewTransaction(TransactionMethod<T> 
code) {
> shouldn't this one be eventually eliminate?
There are quite few usages of TransactionSupport out of commands. VdsBroker for 
example. 

soon VdsBroker would gain CDi support in commands so then we would be able to 
remove this totally
Line 215:         T result = null;
Line 216:         Transaction transaction = null;
Line 217: 
Line 218:         try {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2a73887c76c85b17db6a3c2683d257aece10b59
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to