Continue with pre-instantiation when current bean is in creation already #34349
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
As of 6.2, lenient locking may lead to
BeanCurrentlyInCreationException
on pre-instantiation if another thread has picked up this bean outside of a singleton lock already. While this should never happen in a well-designed bootstrap arrangement where common beans are supposed to come first (through depends-on declaration in dependent beans even for async initialization needs), we can safely ignore a top-levelBeanCurrentlyInCreationException
on mainline pre-instantiation (in the main bootstrap thread) and move on. Effectively, the skipped bean is expected to concurrently finish its initialization in its other thread while the main thread continues with initializing the rest of the non-lazy singleton beans.The text was updated successfully, but these errors were encountered: