[MAGNOLIA-3736] IoC: startables are started at registration time Created: 15/Jun/11 Updated: 15/Sep/11 Resolved: 15/Sep/11 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Tobias Mattsson | Assignee: | Unassigned |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Comments |
| Comment by Tobias Mattsson [ 15/Jun/11 ] |
|
When we register components in the main container, it is already started. When we register a class that is startable and uses @AtStartup it is started as soon as it is registered. When this class depends on another class which has yet to be registered then instantiation fails. In effect this means that @AtStartup is not usable in the main container. To resolve this we need to modify the start up sequence so all registration is done before the container is started. |
| Comment by Tobias Mattsson [ 15/Jun/11 ] |
|
Test case that shows the problem |