org.jboss.weld.extensions.beanManager
Class BeanManagerAware

java.lang.Object
  extended by org.jboss.weld.extensions.beanManager.BeanManagerAware

public class BeanManagerAware
extends Object

Super-class for objects not able to obtain CDI injection that need a reference to the BeanManager. BeanManagerProviders can be registered to allow third parties to register custom methods of looking up the BeanManager.

**WARNING** This class is NOT a clever way to get the BeanManager, and should be avoided at all costs. If you need a handle to the BeanManager you should probably register an Extension instead of using this class; have you tried using @Inject?

If you think you need to use this class, chat to the community and make sure you aren't missing an trick!

Author:
Pete Muir, Nicklas Karlsson
See Also:
BeanManagerProvider, BeanManagerAccessor

Constructor Summary
protected BeanManagerAware()
           
 
Method Summary
protected  javax.enterprise.inject.spi.BeanManager getBeanManager()
          Obtain the BeanManager from the BeanManagerProviders
protected  boolean isBeanManagerAvailable()
          Check if BeanManagerAware has been able to find the bean manager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanManagerAware

protected BeanManagerAware()
Method Detail

getBeanManager

protected javax.enterprise.inject.spi.BeanManager getBeanManager()
Obtain the BeanManager from the BeanManagerProviders

Returns:
the current bean manager for the bean archive

isBeanManagerAvailable

protected boolean isBeanManagerAvailable()
Check if BeanManagerAware has been able to find the bean manager

Returns:
true if the bean manager has been found, otherwise false


Copyright © 2008-2010 Seam Framework. All Rights Reserved.