Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-700

ProcessInjectionTarget.setInjectionTarget() has no effect when trying to post process beans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.8
    • None
    • None

    Description

      In Camel we use this mechanism as a kind of "Spring BeanPostProcessor" like capability to perform our own custom injection on beans created via CDI.

      Here's the code http://svn.apache.org/viewvc/camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/internal/CamelExtension.java?revision=1380220&view=markup e.g. look at line 169 onwards; we create a delegate InjectionTarget so we can post process created objects.

      This works great in Weld - but I've never seen OWB ever invoke the new InjectionTarget instance at all (on any of its methods). I suspect it doesn't allow the InjectionTarget to be changed?

      To try this out checkout Apache Camel then run...

      cd components/camel-cdi
      mvn test -Dtest=ProduceInjectTest -Powb 
      

      which shows the failure occurring. Using weld it works fine.

      Attachments

        Issue Links

          Activity

            People

              struberg Mark Struberg
              jstrachan James Strachan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: