This is a bootstrap registered service in the Weld EE container and can't be changed in a supported way. I would recommend you use a full container (JBoss / Glassfish) to test those scenarios.
There are possible two other options you could try
- The Weld SE container does not have a registered ValidationServices, so you can create a custom Producer for Validator here, but Weld SE does not have Request/Session scope active. So you would have to handle the Scopes manually via Weld specific calls. (A standarized API for scope control acorss all containers and vendors are coming, but not done yet.)
- Outside any supported API/SPI and tied to Weld, it might work to inject BeanManagerImpl, use getServices and add your own v. of ValidationServices. If this works and possible sides effects are unknown.
Thanks for your feedback. I've switched over to the Weld SE container in between and as you suggest I'm manually registering a Validator bean (I had used EE in the first place as the SE container currently doesn't support portable extensions (https://issues.jboss.org/browse/ARQ-335)).
Do you plan to provide some way to set this kind of service in the Weld EE container? Otherwise I think it would be better if the mock implementations of the Weld services threw UnsupportedOperationExceptions that make clear that they can't be used.