[jboss-jira] [JBoss JIRA] Updated: (JBAS-8941) AppClient should return an exit code other than zero when an error occurs

Nicolas Hannebicque (JIRA) jira-events at lists.jboss.org
Fri Mar 11 07:38:46 EST 2011


     [ https://issues.jboss.org/browse/JBAS-8941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Hannebicque updated JBAS-8941:
--------------------------------------

    Attachment: Patch-JBAS-8941.patch


A patch to fix this issue

> AppClient should return an exit code other than zero when an error occurs
> -------------------------------------------------------------------------
>
>                 Key: JBAS-8941
>                 URL: https://issues.jboss.org/browse/JBAS-8941
>             Project: JBoss Application Server
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: AppClient
>    Affects Versions: JBossAS-5.1.0.GA
>            Reporter: Nicolas Hannebicque
>         Attachments: Patch-JBAS-8941.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list