Fooinstance, but only using property and method injection (since bean is already created). Important is that
Fooclass is still not registered into the container. The only thing Petite stores is just some internal cache data, to speed up further injections for the same class.
ItemService, you will always get the singleton instance. However, calling
getItemManager()will return scoped proxy for
ItemManager, that will delegate to the real bean instance stored in current session.
ItemManageris used injected into 'shorter' scoped bean, no scoped proxy is created.