aspose file tools*
The moose likes JSF and the fly likes @PostConstruct not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "@PostConstruct not working" Watch "@PostConstruct not working" New topic
Author

@PostConstruct not working

Mohit Chadha
Ranch Hand

Joined: Feb 04, 2007
Posts: 264
Hi,

I am trying to use @PostConstruct in my managed bean but the method is never called. I am using JSF 1.2, Java 6 and WebLogic 10.3. Can anyone tell me if I am missing something?

Thanks
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
All construction/injection callbacks is usually delegated to the appserver. I would consult the Weblogic docs/forum/support if @PostConstruct is supported by the appserver.

At least I can tell that it just works with Tomcat 6 and Glassfish 2 at my dev environment. Sorry, I can't tell more about Weblogic as I've never used it.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Well, Google at least shows me that you're not the only one who encountered this problem:
http://www.google.com/search?q=weblogic+postconstruct

Good luck.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: @PostConstruct not working