This content has been marked as final.
Show 4 replies
-
1. Re: PostContruct not being called
jaikiran Nov 7, 2008 4:45 AM (in response to mohitanchlia)The PostConstruct will be called after the bean is instantiated. The bean will be instantiated when you lookup it up and access it.
-
2. Re: PostContruct not being called
jaikiran Nov 7, 2008 4:47 AM (in response to mohitanchlia)Going by your code, you seem to be initializing something and you expect this to happen when the application is deployed. If that's what you want, then have a look at the @Service annotation http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html
-
3. Re: PostContruct not being called
mohitanchlia Nov 7, 2008 6:59 PM (in response to mohitanchlia)Thanks. So if there is a pool of 10 beans then does PostContruct gets called 10 times?
-
4. Re: PostContruct not being called
alrubinger Nov 7, 2008 7:16 PM (in response to mohitanchlia)"mohitanchlia" wrote:
Thanks. So if there is a pool of 10 beans then does PostContruct gets called 10 times?
Yes, one per bean instance.
EJB 3.1 will also introduce the @Singleton bean.
S,
ALR