question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Check that CDI extensions use ProcessBean instead of ProcessAnnotatedType where appropriate

See original GitHub issue

Inspired by issue #2418 and PR #2429 (Santiago)

User-provided CDI extensions might veto beans. If our own extensions use @ProcessBean then we will honor those vetos. But if our extensions use @ProcessAnnotatedType then we incorrectly ignore those vetos.

This list is based on a very simple grep of source code for @ProcessAnnotatedType. Some of those uses might be appropriate. We should verify each.

  • Hakari CP datasource integration
  • JPA/CDI integration
  • Metrics (#2492 - Tim)
  • Websocket/Tyrus
  • gRPC metrics and core
  • JAX-RS (#2418 - Santiago)
  • OpenAPI (Tim) [1]
  • Fault tolerance
  • Messaging

[1] We will not change OpenAPI (which currently does not honor vetoes). Normally, SmallRye does the scanning for OpenAPI annotations, using the Jandex index directly, not CDI. If we find no index, we build one in-memory at runtime. If we supported vetoes, then the same app with an index might behave differently from the app without an index. The use of CDI to scan is an implementation choice we made and that should not cause the external behavior to vary between the Jandex and non-Jandex use cases.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ljnelsoncommented, Jun 22, 2022

Please create a new issue with a clear description of the problem and a self-contained reproducer so that we may test the problem.

1reaction
ljnelsoncommented, Jun 22, 2022

I don’t see any portable extensions in https://github.com/architects4j/helidon-challange-skeleton/tree/main/acme-store-service-2/src/main/java/com/architects4j/workshop/microstream/helidon/product. Maybe I’m looking at the wrong thing. Could you please create a new issue with what you think is the problem, along with a small reproducer, so that we can avoid hijacking this unrelated issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check that CDI extensions use ProcessBean instead of ... - GitHub
This list is based on a very simple grep of source code for @ProcessAnnotatedType . Some of those uses might be appropriate. We...
Read more >
Portable extensions
A portable extension may integrate with the container by: Providing its own beans, interceptors and decorators to the container. Injecting ...
Read more >
CDI Part 2: Mastering the Contexts and ... - Oracle Blogs
By default, if an application is deployed without beans.xml , only annotated beans will be recognized. If you aren't running in a CDI...
Read more >
CDI Extensions - Add Interceptors in ProcessAnnotatedType ...
When using it with annotation @Interceptors(LogginInterceptor.class) on a method, everything works fine. I am however trying to create CDI ...
Read more >
Weld Tip 3 - Boost performance of Weld apps
and also use appropriate tools (e.g. JMH for microbenchmarks) ... ProcessAnnotatedType<? extends Number> event) an extension will be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found