<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi guys,<div class=""><br class=""></div><div class=""><br class=""></div><div class="">Bill Shanon, just pointed me to this test in TCK:</div><div class=""><br class=""></div><div class=""><span style="line-height: 13px;" class=""><a href="https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java" class="">https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java</a></span></div><div class=""><br class=""></div><div class="">It tests the following assertion:</div><div class=""><br class=""></div><div class=""><span style="font-family: Menlo-Regular; font-size: 11px; line-height: 13px;" class="">"If the bean is a session bean, the observer method must be either a business method of the EJB or a static method of the bean class.”</span></div><div class=""><span style="font-family: Menlo-Regular; font-size: 11px; line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class="">The EJB containing the observers for the test is:</span></div><div class=""><span style="line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class=""><a href="https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java" class="">https://github.com/cdi-spec/cdi-tck/blob/1.2/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java</a></span></div><div class=""><span style="line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class="">The EJB contains one business method coming from a local interface, one from a remote and one static method. the 3 are observers methods</span></div><div class=""><span style="line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class="">The test expects that the remote business observer method should be called.</span></div><div class=""><span style="line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class="">Here we have an inconsistency IMO. By doing this we are violating rules the CDI spec regarding the fact that remote EJBs are not CDI beans. And we are calling this remote business method passing the event payload by reference and not by value which violates EJB specification regarding remote EJB.</span></div><div class=""><span style="line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class="">I suggest that we change the assertion to: </span></div><div class=""><span style="line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="font-family: Menlo-Regular; font-size: 11px; line-height: 13px;" class="">If the bean is a session bean, the observer method must be either a local business method of the EJB or a static method of the bean class.</span></div><div class=""><span style="font-family: Menlo-Regular; font-size: 11px; line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class="">and the TCK accordingly. Any thought ?</span></div><div class=""><span style="line-height: 13px;" class=""><br class=""></span></div><div class=""><span style="line-height: 13px;" class="">Antoine</span></div></body></html>