Right now, org.jboss.weld.environment.se.Weld static initializer always performs SingletonProvider reset if RegistrySingletonProvider is not used.
Add ENFORCE_PARALLEL_CONTAINER_SUPPORT (maybe some better name?) system property, true by default. Log a warning if false and RegistrySingletonProvider not used (multiple parallel Weld instances not supported).
We can also consider adding SingletonProvider.isParallelContainerSupportSupported() so that it's possible to skip the warning for providers which should also work.
|