BATCH-2077 Java Config: Register listeners just once

Solving BATCH-2077 for the 2.2.x branch.