Max,
  That's right.  The constructor is only called when you initialize the
topology.  Then the bolts are serialized and sent around, when they are
reinflated the prepare method is called for connecting to databases or
whatever objects need to be created that can't be serialized.   So you use
the prepare as you would use the constructor in more traditional java.

AZ


On Mon, Jul 21, 2014 at 9:31 AM, Max Evers <[email protected]> wrote:

> Can anyone explain the distinction between the prepare statement and the
> constructor?   when is either called?   The impression I get is that the
> constructor is called when the topology is first started and prepare is
> called when workers are 'given' to a bolts task?  Confirm / deny?
>

Reply via email to