Search code examples
javajakarta-eejboss

How to check if deployments are running on JBoss


Today our Software-Architect gave me the task to implement an "AliveCheck". This means I'll have a war file, which checks if all deployments on our JBoss are running.

Is there a common practice how to implement something like that? I am completely at a loss here.


Solution

  • I would start at the official oracle documentation, chapter 35 " Discovering and Monitoring JBoss Application Server".

    But beyond that, you have to understand: it is pretty hard to decide from the outside if an application is truly alive.

    You see, you can have situations where all your threads make progress, and all CPUs are on a constant load - and still the customer facing part of the service isn't moving any more.

    In other words: your first question should go back to your architect and ask him about the core properties of each of your applications.

    Meaning: in order to be really accurate you need insight into each of the applications. Each application must be architected in a way that allows for an external service to determine "service X is still alive and doing something useful". This question can't be answered in general - each service might have different properties that need observation!

    Beyond the first link, another good read regarding this topic: "Release it" by Michael Nygard. Although that book is out for almost 10 years, it nicely discusses the aspect of "insight" into services.