Flume uses static state in a number of places. Some instances cause significant pain during testing or extension. Flume should be refactored to push static state down to instances (Factories, Registries, and similar patterns) and then use DI to make these instances available where needed.
- FlumeBuilder uses a static SourceFactory and SinkFactory. Modifications to the static instances during testing pollute the JVM. Setting and resetting is extremely error prone.
- FlumeMaster pushes a new instance into a static member on each invocation of the constructor. This is one step worse than a singleton in that subsequent construction disrupts existing captures of the shared instance.
- The web application JSPs follow the inside-out invocation scheme in that they capture a reference to the FlumeMaster static instance in an attempt to get at current state (rather than having an instance injected or passed). This is fragile and subject to construction practices.