File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Multiple PostConstruct methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Multiple PostConstruct methods" Watch "Multiple PostConstruct methods" New topic
Author

Multiple PostConstruct methods

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Guys,

I guess thie question has already been raised before. What happens when we have multiple methods in a bean class annotated as PostConstruct?? From the apecs, it is clear that only once the PostConstruct will be called, but which one would be choosen?


SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
It is unspecified, so it is unpredictable.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple PostConstruct methods
 
Similar Threads
Need to call a method to populate my list, then have that list bound to rich tree
@PostConstruct and @PreDestory
Life-Cycle Event Interceptor Method Skipped
@PostConstruct is never called.
EJB3 mock questions available now! (Section 2)