Sciurus Sciurus is a collection of useful aspects to

  • monitor execution runtimes of methods
  • lock method executions
  • cache method results
  • retry method executions on exceptions

General Usage

You need to include Sciurus as dependeny and declare it as an aspect library in the aspectj-maven-plugin.

  1. Include Sciurus as dependency

  2. Include aspectj-maven-plugin and define Sciurus as aspectLibrary


Use Case Examples

There are a number of possible use cases for each aspect.


  • Notify a monitoring application
  • Find bottlenecks
  • Test the speed of a new software version before deploying it in production
  • Store execution times (e.g. in a database) and
    • see how they evolve over time
    • see runaway values
    • monitor them through a MBean


  • Caching (surprise!)
  • Facade for various caches which can be exchanged with merely little code changes


  • Prevent multiple storing (e.g. in databases)
  • Prevent multiple execution of long running or high cpu consuming methods (e.g. in combination with @Cache)


  • Retry storing entities into the database due to locking exceptions
  • Retry a failed connection to a web service
  • Retry a method which may lead to some random or temporary incidents

More information and example

Marcel Carlé
Marcel Carlé
Software Developer

My developing interests include cloud computing, DDD, event sourcing, and serverless architectures.