Weld issue:
The Singleton is not a bean defining annotation (from CDI point of view), so it is ignored when using annotated bean discovery mode. You can work around this by creating a stereotype (as noted in the provided link).
So @Singleton is supported if you use a stereotype or manually add it as a bean, but not supported for automated discovery when using “annotated” discovery mode.
I am looking into the possibility of enabling it by default even for annotated discovery mode…
Tomas
I don't see why @Singleton is not supported since it is part of JSR 330, which is supported by CDI. You should raise this with the Helidon project. Thanks Emily
Hi team,
I have recently migrated to Helidon from classic EE application. One problem I faced there was that the CDI stopped working. After getting some help, I was suggested to replace @Singleton with @ApplicationScoped. Once that's done things started working.
I was discussing the same with Reza Rehman a day back after seeing his news letter on Jakarta EE 10. He suggests not to use Singleton unless it's absolutely necessary.
Here is my concern: If we have more than one option for doing same thing and other than one option everything else comes with 'use it if it's absolutely necessary' tag, then why don't we just remove those extra things and keep the one which is best to use. If we can remove in one shot, let's deprecate them.
Can we ?
Regards, Abhideep _______________________________________________ cdi-dev mailing list cdi-dev@xxxxxxxxxxx To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdi-dev
-- _______________________________________________cdi-dev mailing listcdi-dev@xxxxxxxxxxxTo unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/cdi-dev__;!!GqivPVa7Brio!N7ub22DMrTpjNHaoN7tYdOPNeOJJ4CF-Mwgo12EVWrear7i8HAc5jyXjX69rHZeWCw$
|