• Post Reply Bookmark Topic Watch Topic
  • New Topic

About a singleton bean lifecycle in ePractice Lab

Himai Minh
Ranch Hand
Posts: 1400
  • 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.

my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!