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 3 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 a CheckingContextListener which checks its own dependencies (checks that Spring itself is present via the SpringPresenceCheck and then uses the SpringBeanCheck to check that the SafeDelegatingCheckRunner has been properly configured via Spring to have a List of IChecks to run.

The CheckingContextListener packages up the results of running these IChecks 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