Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using @PostConstruct vs constructor initialization

843830Dec 4 2006 — edited Dec 5 2006
I've been reading through an EJB 3 book. I've noticed that lots of the examples of stateful session beans use methods marked with @PostConstruct to do member variable initialization instead of just initializing them in the constructor. There must be a reason for this, right?

Can anybody explain the purpose for this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2007
Added on Dec 4 2006
1 comment
695 views