Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

What is this package?

The checks package implements a tool for performing configuration sanity checks at runtime.

This is different from Unit Tests, which verify that a unit of code (typically, a Java class) performs as specified.

This is different from Functional Tests, which verify that an integrated product functions as specified.

These are sanity checks to be executed at deploy time or in a running uPortal instance which validate aspects of a deployment. They are intended to produce output that a deployer, especially a deployer new to uPortal, can use to get a leg up on the sometime difficult and complex task of deploying a customized uPortal instance.

What API does this package implement?

The core API implemented by this package is that of the ICheck interface. Instances of implementations of ICheck check for some specific aspect of a deployment, for example the version of some particular jar file or the presence of some particular Spring-configured singleton Bean. IChecks return a CheckResult which can express either the success of a check or a failure of a check. Failures can include advice to the deployer about how to remediate this issue.

The current use of this API is by means of the ICheckRunner interface. There are two implementations of this interface. BasicCheckRunner simply and safely executes a configured List of ICheck instances. SafeDelegatingCheckRunner checks its own dependencies (Spring and a particular Spring-configured instance of ICheckRunner) and then delegates to that Spring-configured instance of ICheckRunner to execute configured checks.

A CheckingContextListener executes SafeDelegatingCheckRunner and then logs its results. The CheckingContextListener packages up the results and exposes them in the ServletContext as a List of CheckAndResult objects, which are just simple JavaBeans that package together CheckResults with a description of the ICheck that was run to obtain the result.

A ChecksServlet renders this List of results and also renders a table of information about packages available at runtime.

The ICheck interface

Available implementations

These implementations of the ICheck interface are distributed with uPortal 2.5.

  • No labels