• Post Reply Bookmark Topic Watch Topic
  • New Topic

About a singleton bean lifecycle in ePractice Lab  RSS feed

Himai Minh
Ranch Hand
Posts: 1574
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In mock exam 1 question 29 of ePractice lab, the lifecycle of the singleton bean as shown in the answer is incorrect and inconsistent with the explanation:
The lifecycle is:

1. does not exist
2. post construct
3. dependency injection
4. method ready
5. predestroy
6 new instance()

But in the explanation,

A singleton bean starts when the container invokes the newInstance method....
next, the container forms any dependency injection by the metadata or by deployment descriptor
the container then calls the post construct method...

the singleton is now ready to be delegated....
when the application is shutting down, the container invokes the predestroy ....

The explanation is correct, but the model answer is not.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!