This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Doubt regarding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Doubt regarding "Multiple Lifecycle Callback Methods for an Entity Lifecycle Event "" Watch "Doubt regarding "Multiple Lifecycle Callback Methods for an Entity Lifecycle Event "" New topic
Author

Doubt regarding "Multiple Lifecycle Callback Methods for an Entity Lifecycle Event "

kavan desai
Ranch Hand

Joined: Jan 16, 2005
Posts: 32
Can some body explain the following :
If a lifecycle callback method for the same lifecycle event is also specified on the entity class and/or one or more of its entity or mapped superclasses, the callback methods on the entity class and/or superclasses are invoked AFTER the other lifecycle callback methods, most general superclass first.

Thanks.
[ August 26, 2008: Message edited by: kavan desai ]
Musab Al-Rawi
Ranch Hand

Joined: Aug 06, 2007
Posts: 231
That means that callback methods are invoked starting from the superclass (parent class) all the way down the hierarchy.

for example A super class of AA, both classes define a callback method for the same event e, so callback method of A is invoked first then callback method of AA.


SCBCD - SCWCD - SCJD - SCJP - OCA
sandeepsharma
Greenhorn

Joined: Jan 05, 2007
Posts: 8
Call back on Entity listeners will be executed first if specified, followed by Super classes and then the sub classes.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Doubt regarding "Multiple Lifecycle Callback Methods for an Entity Lifecycle Event "
 
Similar Threads
Entity callback doubt
how many PrePassivate methods we can have in an stateful session bean ?
Multiple Entity callback methods in entity hierarchy
Lifecycle callback interceptor
Many @PostConstruct methods?