I tried to debug of beans creation and understood that it is random order. What is the order of bean creation in Weld? Is there a graph of beans?
Asked
Active
Viewed 103 times
0
-
_"and understood that it is random order."_ from where? – Kukeltje Feb 05 '20 at 12:24
-
random order of bean creation – Yurii Kachmar Feb 05 '20 at 14:50
-
ok, let me rephrase that... Can you give us the link to specs or code where you read that 'random order' is the behaviour – Kukeltje Feb 05 '20 at 14:52
1 Answers
0
It won't be "Random". Generally everything will be "lazy" instantiated, but when demand for a bean occurs, it will reach to the bottom of the bean dependency graph and recursively instantiate dependencies. If two nodes occur at the same depth, order of instantiation may be undefined, but most certainly won't be randomized.

Jonathan S. Fisher
- 8,189
- 6
- 46
- 84