Menu

IllegalStateException

Help
mattlf
2008-09-05
2013-04-22
  • mattlf

    mattlf - 2008-09-05

    Hi

    Today

    I ran accross the following Exception

    Root cause: java.lang.IllegalStateException: shutting down
            at org.otfeed.protocol.connector.OTThreadingEngine.submit(OTThreadingEngine.java:452)
            at org.otfeed.protocol.connector.OTEngine$RequestHandler.submit(OTEngine.java:84)

    When is the exception thrown ?
    Why is an UncheckedException used here ?
    Should I catch it ? If yes what should the client application do when it receives it?

    Thank you for your help

     
    • Mike Kroutikov

      Mike Kroutikov - 2008-09-05

      What it means: you submit a request when connection to the OT server was broken (connection factory shut down). Reasons why connection is broken may be: you called connection.shutdown(), or connection experienced an unrecoverable error (like wrong password).

      You should not catch this, as there is no graceful way to recover - connection factory is no longer usable.

      Instead, you should avoid this situation by using ConnectionStateListener: do not send requests before you logged in successfully, or after listener reported an error.

      -Mike

       

Log in to post a comment.

MongoDB Logo MongoDB