Open arvidvillen opened 4 years ago
I think it should work if you try using @Singleton
scope.
Can you give it a try?
I'm not sure what we can do about the other scopes. It would probably need investigation.
Indeed @Singleton
works 😊
However, most of my use cases are @RequestScoped
scoped.
I think @Singleton
works because it does not use proxies..is there a performance benefit (speed, memory) when using @ApplicationScoped
instead of @Singleton
?
Any process on this? Why is a record not allowed for request scoped objects? How great would a record be for this: immutable so for another request guaranteed a new instance. When using a POJO instead, would there not be a potential issue that the POJO may contain property values of another request?
Description It would be nice if you could use Java 14 records in CDI/arc producer methods. Currently you get the following (build time) exception:
Example Example project using a record producer: https://github.com/arvidvillen/quarkus-producer-records
Implementation ideas Im not sure this is technically possible (or if it’s a good idea) so feel free to reject this issue if you don’t want to support it.