Class CDIHandler

java.lang.Object
org.datanucleus.CDIHandler

public class CDIHandler extends Object
Handles the integration of "javax.enterprise.inject" CDI API. Note that this is the only class referring to CDI classes so that it is usable in environments without CDI present. TODO Make this thread-safe
  • Field Details

    • beanManager

      javax.enterprise.inject.spi.BeanManager beanManager
    • creationalContexts

      Set<javax.enterprise.context.spi.CreationalContext> creationalContexts
    • injectionTargets

      Map<Object,javax.enterprise.inject.spi.InjectionTarget> injectionTargets
      Cache of InjectionTarget keyed by the object that they created.
  • Constructor Details

    • CDIHandler

      public CDIHandler(Object beanMgr)
  • Method Details

    • createObjectWithInjectedDependencies

      public <T> T createObjectWithInjectedDependencies(Class<T> cls)
      Method to instantiate an object of the specified type with injected dependencies.
      Type Parameters:
      T - Type of the object
      Parameters:
      cls - The type to instantiate
      Returns:
      The instance
    • close

      public void close()