-
Bug
-
Resolution: Done
-
Major
-
2.0.2.Final
-
None
-
None
BeanManager.getBeans() throws an exception if the state of the container is anything other than VALIDATED or INITIALIZED.
The message of the exception is "BeanManager method getBeans() is not available during application initialization", which is misleading when the container is in the SHUTDOWN state.
Actually, the spec doesn't even say that an exception should be thrown when shutdown. But it sounds reasonable that it should.
We should either not throw the exception or change the message to something like "... getBeans() is not available during application initialization or after shutdown" (or split these two cases and have different messages for each case).