Bug 553773 - Avoid calling hooks while registering

This avoids getting the framework hook until after it has finished
registering.  Some hooks run into issues if they are allowed to be
called while they are registering.  For example, WeavingHooks that are
registered by declarative services can cause issues with re-entering
into activation by SCR.

This change also avoids the constant get/unget service hooks
registrations each time the hook is invoked. Hooks are high traffic
services during event storms.  This should improve performance when
hooks are present.

Change-Id: Ic937616d421f1d5944b614a91e74417070f06fd0
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
3 files changed