1

Having a bean defined as @RequestScoped bean which is injected via @Inject at different Levels.

There are some singleton which aren't using Helidon/CDI scoped annotations. When using CDI.current.select.... returned Object is different than what gets Injected via @Inject on CDI Aware beans.

The issue is when using CDI.current().select(...).get() within the same flow of the http request, object returned are different. How to get the same bean which is available via @Inject on non-cdi annotated classes.

Vishal
  • 11
  • 2
  • In order to provide you a useful answer: Have you put together a reproducer somewhere that shows that `@Inject Foo requestScopedFoo;` and `CDI.current().select(Foo.class)`, during a single request, result in objects that are not equal? (Bear in mind simple, documented things in CDI, like that requests are per-thread.) – Laird Nelson Aug 10 '23 at 20:37

0 Answers0