There is a Java services based BeanManagerAware superclass in weld-extensions under construction that has a getBeanManager(). I also recall seeing the famous
three-linerfor getting the reference somewhere in extensions but I can't seem to find it now. It will be there sooner or later, anyway so you'll be able to do something like
The static helper is probably a better idea since you need to extend nothing. Having to extend BeanManagerAware might pose some restriction on integrating frameworks that also uses extensions.
That was one design option but I think Pete wanted it to be as ugly as possible so it wouldn't be used that much ;-) There was also something with static and classloaders, can't remember now. It might of course be subject to change since it's just a minor implementation detail.