wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Method names starting with 'ejb' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply locked New topic

Method names starting with 'ejb'

Anirudh Gupta
Ranch Hand

Joined: Dec 08, 2010
Posts: 43

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.

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9960

Duplicate of http://www.coderanch.com/t/569768/EJB-JEE/java/Method-names-starting-ejb. Please do not ask the same question in more than one thread.

[My Blog] [JavaRanch Journal]
I agree. Here's the link: http://aspose.com/file-tools
subject: Method names starting with 'ejb'
Similar Threads
Session Beans and SessionBean interface.
Getting a SocketOrChannelConnectionImpl in Weblogic
EJB Spec violationg for session bean rules.
Method names starting with 'ejb'
EJB Single Timer Bean Implementation