dev@glassfish.java.net

added feature to hk2

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Tue, 23 Jun 2009 23:00:11 -0700

Hi

I don't remember who outside of Tim needed that feature but I added the
ability to figure out if a service has been initialized or not (useful
for singleton services really).

the pattern is pretty simple, look at the LazyInitialization unit test
in hk2, but in short

        Inhabitant<HeavyBean> inhabitant =
habitat.getInhabitantByType(HeavyBean.class);
        if (inhabitant.isInstantiated()) {
             // service was used
        } else {
             // service was not used.
        }

let me know if you run into issues.