2 Replies Latest reply on Aug 14, 2012 8:20 AM by mkouba

    How can I use interceptors around objects created by producer methods

    kramedt

      From what I have read this isn't supported by the CDI spec:

      https://issues.jboss.org/browse/CDI-59?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

      http://docs.jboss.org/weld/reference/1.0.0/en-US/html/producermethods.html

       

      But I was wondering if there is any way around this, for example some way to programmatically bind an interceptor to an object created in a producer method.  I know I can create a wrapper object around my actual object, and assuming the wrapper object is itself a CDI bean, I can then intercept the calls to the wrapper object, but is there any other way to do this?