[
https://issues.apache.org/jira/browse/DELTASPIKE-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15431960#comment-15431960
]
Sean Flanigan commented on DELTASPIKE-1197:
-------------------------------------------
I have some code for this here:
https://github.com/apache/deltaspike/compare/master...seanf:DELTASPIKE-1197
I haven't created a pull request because there seem to be a lot of tests which
depend on remembering BeanManagerProvider after the CDI container shuts down.
In other words they depend on the fact that
org.apache.deltaspike.core.api.provider.BeanManagerProvider#cleanupStoredBeanManagerOnShutdown
doesn't actually clean up the bmpSingleton.
I don't know if that's just a problem with the tests, or if there really is a
need to hang on to the BeanManagerProvider after the container shuts down, but
either way it seems wrong.
> CDIAwareConstraintValidatorFactory should fall back to delegate when CDI is
> not active
> --------------------------------------------------------------------------------------
>
> Key: DELTASPIKE-1197
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1197
> Project: DeltaSpike
> Issue Type: Improvement
> Components: BeanValidation-Module
> Affects Versions: 1.7.0
> Reporter: Sean Flanigan
>
> If there is no contextual instance for a class,
> CDIAwareConstraintValidatorFactory.getInstance() falls back on the delegate
> ConstraintValidatorFactory. If the BeanManagerProvider is not active, it
> should have the same fallback.
> This change would make testing in mixed environments easier (eg a mixture of
> CDI-Unit tests where Weld is active, and plain JUnit tests where Weld is not
> active), since CDIAwareConstraintValidatorFactory may be configured in
> validation.xml and could be difficult to override.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)