Forums Register Login

Method names starting with 'ejb'

+Pie Number of slices to send: Send
JSR 318: Enterprise JavaBeansTM,Version 3.1. Pg122, Section 4.9.3

Compatibility Note: If the PostConstruct lifecycle callback interceptor method is the ejbCreatemethod,
if the PreDestroy lifecycle callback interceptor method is the ejbRemove method, if the PostActivate lifecycle
callback interceptor method is the ejbActivate method, or if the PrePassivate lifecycle callback interceptor
method is the ejbPassivate method, these callback methods must be implemented on the bean class itself
(or on its superclasses). Except for these cases, the method names can be arbitrary, but must not start with
“ejb” to avoid conflicts with the callback methods defined by the javax.ejb.EnterpriseBean interfaces.



If in the below code I replace @PostActivate and @PrePassivate with @Override, I receive the below,


If however I continue with @Override I receive the following,


Now there seems to be an obvious contradiction between what the Specification says and the behavior observed.
OR IS IT SOMETHING THAT I HAVE DONE/UNDERSTOOD WRONG??

+Pie Number of slices to send: Send
Duplicate of https://coderanch.com/t/569768/EJB-JEE/java/Method-names-starting-ejb. Please do not ask the same question in more than one thread.

sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


Reply locked
This thread has been viewed 1679 times.
Similar Threads
EJB Spec violationg for session bean rules.
EJB Single Timer Bean Implementation
Getting a SocketOrChannelConnectionImpl in Weblogic
Session Beans and SessionBean interface.
ETS Question doubts
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:48:58.