Bring in guice 3 as a maven dependency.
Have some injection infrastructure.

The Injector used by storm tasks is a lazy-initialized static member of HBaseComponent.  When created lazy, the bindings are supplied by the (currently empty) ProductionModule.

A package-private static setter is present for tests, which is exploited by HBaseComponentFixture.  The (empty) bindings it employs are taken from an anonymous module that can bind dependencies to various fixture mocks.

Injection takes place within start(), which both HBaseSpout and HBaseBolt call in their prepare-like events.

Since Storm ultimately creates component instances, we obviously can't use Guice to construct them.  Instead we use Injector#injectMembers (which is designed for this exact case) to supply dependencies of existing instances.
Start flushing out ProductionModule.

In particular, grab the storm conf and topology context from start and bind them.

This commit would also deal with the ExecutorService, but it looks like I need to tackle the connector first.
Move ProductionModule to config package.
Add request scoping.

We use guice's built-in RequestScope, which can be used outside of an http context, as a "task" scope: the granularity of injection caching appropriate for individual tasks.

Note this is not the same as singleton scope, which we'd like to share across all tasks sharing the worker process VM.

The request/task scope has embedded in it the storm configuration and topology context that are received at start time.  The topology context truly does wish to be scoped this way as it contains a "current" task id: each task receives a different context.  The storm config could conceivably be shared but we simply don't see it before start.

These two dependencies, which guice is of course unable to create, have to be inserted somehow.  We opt to use a child injector, which binds the two deps to the passed instances.  The child injector is then used only within the context of a new request scope, provided by ServletScopes.scopeRequest.  In this way request-scoped dependencies supplied by the child injector can be correctly cached, and request scoping doesn't bleed out into the common parent injector.

To prove this is not just the mumblings of a madman, we use this structure to inject the TopologyContext into the HBaseComponent itself.
Use the honest-to-god passed type for storm config.