Weld interceptor doesn't fire/catch events in Fuse

Solution Unverified - Updated -

Issue

  • In our project we need to intercept the calls to specifics backend methods using an interceptor.
    After few documentation and, as Weld is already integrated in A-MQ 6.2 as a feature, our choice fall back to Weld.

  • We configured our project to use Weld and we added the interceptor implementation but, despite the initialization of the Weld context (that seems to be done correctly except for few warnings), no interceptor events are fired (or caught may be) by Weld.
    We spent time googling about our issue but we didn't find any helpful tip to understand what we missed.

  • We are wondering if we missed something in the Weld configuration/implementation or if we incurred into a bug/feature not implemented.

  • We saw the same behavior on both the 6.2 133 build and 6.2 143-p1 releases.
    The weld-cdi feature that we installed is the pax-cdi-1.2-weld (that installed also the pax-cdi-1.2 feature).

The Weld context startup log is:

INFO  | FelixStartLevel  | CdiExtender                      | ax.cdi.extender.impl.CdiExtender   62 | 211 - org.ops4j.pax.cdi.extender - 0.11.0 | starting CDI extender org.ops4j.pax.cdi.extender
INFO  | FelixStartLevel  | CdiExtender                      | ax.cdi.extender.impl.CdiExtender  143 | 211 - org.ops4j.pax.cdi.extender - 0.11.0 | creating CDI container for bean bundle com.redhat.commons-bundle [567] with extension bundles [org.ops4j.pax.cdi.extension [210]]
INFO  | FelixStartLevel  | AbstractCdiContainer             | pax.cdi.spi.AbstractCdiContainer   88 | 209 - org.ops4j.pax.cdi.spi - 0.11.0 | Starting CDI container for bundle com.redhat.commons-bundle [567]
INFO  | FelixStartLevel  | Version                          | org.jboss.logging.JDKLogger        44 | 213 - org.jboss.logging.jboss-logging - 3.1.3.GA | WELD-000900: 2.2.4 (Final)
INFO  | FelixStartLevel  | Bootstrap                        | org.jboss.logging.JDKLogger        64 | 213 - org.jboss.logging.jboss-logging - 3.1.3.GA | WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
WARN  | FelixStartLevel  | Interceptor                      | org.jboss.logging.JDKLogger        44 | 213 - org.jboss.logging.jboss-logging - 3.1.3.GA | WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
WARN  | FelixStartLevel  | Interceptor                      | org.jboss.logging.JDKLogger        44 | 213 - org.jboss.logging.jboss-logging - 3.1.3.GA | WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
WARN  | FelixStartLevel  | Bootstrap                        | org.jboss.logging.JDKLogger        64 | 213 - org.jboss.logging.jboss-logging - 3.1.3.GA | WELD-000135: Legacy deployment metadata provided by the integrator. Certain functionality will not be available.
WARN  | FelixStartLevel  | Event                            | org.jboss.logging.JDKLogger        44 | 213 - org.jboss.logging.jboss-logging - 3.1.3.GA | WELD-000411: Observer method [BackedAnnotatedMethod] public org.ops4j.pax.cdi.extension.impl.OsgiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.

Environment

  • Red Hat JBoss Fuse
    • 6.x
  • WELD

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.