Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1466

Misleading error message when BeanManager.getBeans() is called after shutdown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.4.Final, 2.1.0.Alpha1
    • 2.0.2.Final
    • None
    • None

    Description

      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).

      Attachments

        Activity

          People

            marko.luksa@gmail.com Marko Luksa (Inactive)
            marko.luksa@gmail.com Marko Luksa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: