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

    Details

    • Type: Feature Request
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: JBossAS-5.1.0.GA
    • Fix Version/s: No Release
    • Component/s: AppClient
    • Labels:
      None

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nhannebicque Nicolas Hannebicque
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: