Moti Asayag has posted comments on this change. Change subject: core: CDI Transaction Interceptor ......................................................................
Patch Set 9: (6 comments) failed to verify with: 2015-05-11 10:41:32,230 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (MSC service thread 1-6) [] transaction rolled back 2015-05-11 10:41:32,231 ERROR [org.ovirt.engine.core.bll.Backend] (MSC service thread 1-6) [] Failed to finalize running Jobs: java.lang.NullPointerException at org.ovirt.engine.core.utils.transaction.TransactionalInterceptor.invoke(TransactionalInterceptor.java:24) [utils.jar:] ... Were you able to add a host ? https://gerrit.ovirt.org/#/c/39790/9/backend/manager/modules/bll/src/main/resources/META-INF/beans.xml File backend/manager/modules/bll/src/main/resources/META-INF/beans.xml: Line 1: <beans xmlns="http://java.sun.com/xml/ns/javaee" Line 2: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Line 3: xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd" > Line 4: </beans> Line 5: tws https://gerrit.ovirt.org/#/c/39790/9/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/transaction/Transactional.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/transaction/Transactional.java: Line 14: @Inherited Line 15: @Target({ ElementType.METHOD, ElementType.TYPE }) Line 16: @Retention(RetentionPolicy.RUNTIME) Line 17: @InterceptorBinding Line 18: public @interface Transactional { please add javadoc for the annotation, its purpose and behavior Line 19: @Nonbinding TransactionScopeOption propogation() default TransactionScopeOption.Required; https://gerrit.ovirt.org/#/c/39790/9/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/transaction/TransactionalInterceptor.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/transaction/TransactionalInterceptor.java: Line 9: import org.slf4j.Logger; Line 10: import org.slf4j.LoggerFactory; Line 11: Line 12: @Transactional Line 13: @Interceptor please add javadoc Line 14: public class TransactionalInterceptor { Line 15: private static final Logger logger = LoggerFactory.getLogger(TransactionalInterceptor.class); Line 16: Line 17: @AroundInvoke Line 14: public class TransactionalInterceptor { Line 15: private static final Logger logger = LoggerFactory.getLogger(TransactionalInterceptor.class); Line 16: Line 17: @AroundInvoke Line 18: public Object invoke(final InvocationContext context) throws Exception { is it possible to define the TransactionalInterceptor as inherited and define it once on the AbstractJpaDao to be applied for all JPA daos ? Line 19: Transaction current = TransactionSupport.current(); Line 20: if (current == null) { Line 21: return runInTransaction(context, TransactionScopeOption.Required); Line 22: } else { Line 19: Transaction current = TransactionSupport.current(); Line 20: if (current == null) { Line 21: return runInTransaction(context, TransactionScopeOption.Required); Line 22: } else { Line 23: Transactional transactional = context.getMethod().getAnnotation(Transactional.class); i failed to verify it on my env using jboss-7.1.1: the value of transactional is null. Line 24: return runInTransaction(context, transactional.propogation()); Line 25: } Line 26: } Line 27: Line 38: private InvocationContext context; Line 39: private Exception throwable; Line 40: Line 41: public ExceptionAwareTransactionMethod(InvocationContext context) { Line 42: super(); not needed Line 43: this.context = context; Line 44: } Line 45: Line 46: @Override -- To view, visit https://gerrit.ovirt.org/39790 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94bf3b41764b137e5456995d393f023d3564e301 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches