[cdi-dev] Inconsistency in the spec regarding remote EJBs
antoine at sabot-durand.net
Thu Jul 16 09:25:40 EDT 2015
Bill Shanon, just pointed me to this test in TCK:
It tests the following assertion:
"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.”
The EJB containing the observers for the test is:
The EJB contains one business method coming from a local interface, one from a remote and one static method. the 3 are observers methods
The test expects that the remote business observer method should be called.
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.
I suggest that we change the assertion to:
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.
and the TCK accordingly. Any thought ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cdi-dev