This is one of the reasons I didn't create a PR yet; not sure what the answer is yet but was going to explore it (possibly using ApplicationContextInitializer and creating ContainerMetadata earlier).

Earlier (current master) we had a static method being called to publish the container started event from a context (static so SingleNodeApplication could also call it), but that definitely needs to change. We need a bean, with a managed lifecycle.