Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8941

AppClient should return an exit code other than zero when an error occurs

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Major
    • No Release
    • JBossAS-5.1.0.GA
    • AppClient
    • None
    • 0
    • 0% 0%

    Description

      Our task scheduler launches via a shell script a JBoss client which publishes messages in a JMS queue.

      Our problem is that the class org.jboss.client.AppClientMain always exits with a 0 status code, even if an error occurred during the client execution (missing injection, RuntimeException thrown, etc), thus making our task scheduler unaware that something wrong happened.

      There is a few try catch (Throwable) in the code, generally not rethrowing the exception to its caller. We could focus on the one located in the invokeMain method of the org.jboss.ejb3.client.ClientContainer class.

      I've locally modified this class (I'm just rethrowing the "InvocationTargetException"s) and the AppClientMain class to exit with a -1 status code when an error occured and it works as (I ?) expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nhannebicque Nicolas Hannebicque (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: