5

Initialization of a specific bean requires performing a network connection. This may take some time, and unnecessarily blocks the already long startup by a few seconds.

Is there any way for my bean to signal that it isn't yet initialized even after it exits the constructor, and then later, when it's ready, signal to the context that it now IS ready and it's status should be moved to "initialized".

f.khantsis
  • 3,256
  • 5
  • 50
  • 67

1 Answers1

1

Well, there is a task for non-lazy beans for Spring5x. Spring 5 is out now, but the ticket is unresolved yet.

Similar problems have been resolved years before like the bootstrap of database connection. If this does not solve your main problem, please be patient for later releses of Spring 5.

References:

Grim
  • 1,938
  • 10
  • 56
  • 123
  • whos says they'll implement it? – f.khantsis Oct 01 '17 at 22:11
  • @f.khantsis If you open SPR-8767 you will notice it is timed for version 5.x backlog. If a ticket is timed, you are allowed to guess that it is well founded. Depending on the type of backlog (sprint backlog or product backlog) and the priority you can guess that it is already estimated in complexity, dangerous and (time-)costs. You are right, I am guessing around but trust a scrum master, the team will succeed in the range they committed it! – Grim Oct 02 '17 at 20:07