1 Reply Latest reply on Sep 1, 2011 5:48 PM by Peter Johnson

    Catch exceptions at container level?

    kevin denington Newbie

      Hey all,

       

      We're running Jboss 4.2.3 and have multiple apps (around 15) deployed to our production instance.  Although each app has it's own excpetion handling capabilities, there are still times when unexpected (and unhandled) events occur and sometimes the only way to know that they have occurred is to check the server log.  (eg. null pointers, sql exceptions, etc...)

      Is there an easy way to catch/detect exceptions at the instance level?  If there was, I was hoping to have an app that could update a report or something when such an exception occurs so that we don't need to browse through a log file.  I don't want to have to add specfic code for this type of thing to each app. 

       

      I am aware of the \jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\conf\web.xml file as we've got a filter defined that applies to all our apps, so maybe something in here?  Just looking for suggestions / best practices for such a thing, thanks.

        • 1. Re: Catch exceptions at container level?
          Peter Johnson Master

          Most enterprise class monitoring tools can scan log files and extract error and warning messages. Of course, they cost $$$$$$

           

          You could create a separate log file that holds only error or error and warning messages. That way you don't have to scan the whole server log. You could even configure such errors to be sent via email of delivered to a JMS queue. The log4j docs should give you ideas of how to do this.