Closed glassfishrobot closed 11 years ago
Reported by jharting
mvatkina said: EJB 3.1 said "All methods of the bean class and any superclasses must not be declared final". We tried to relax this restriction, and it is definitely too harsh for private methods - you can't access them through proxy anyway. We can relax less
mvatkina said: Will change the "non-final" rule to: "Only private methods of the bean class and any superclasses may be declared final."
Will also add both restrictions to the message listener methods with a no-methods interface.
mvatkina said: The final rule is: "Only private methods of the bean class and any superclasses except java.lang.Object may be declared final."
The existing rule requires the EJB Container to prevent access of protected and package private methods.
Was assigned to mvatkina
This issue was imported from java.net JIRA EJB_SPEC-104
Marked as fixed on Monday, April 8th 2013, 1:16:34 pm
Section 3.4.4 says:
Since a method with another access modifier (let's say a protected method) may be declared final I cannot see a way the container could reliably use a proxy to wrap the method invocation. Since the container cannot wrap the invocation, there is not way for container to detect the attempted invocation and throw javax.ejb.EJBException - which the spec requires.
Affected Versions
[3.2]