Thanks Romain,

That seems to fix the issue.

Bruno Baptista
https://twitter.com/brunobat_


On 09/01/19 19:38, Romain Manni-Bucau wrote:
Hello Bruno

Upgrade either tck or owb in tomee.

Le mer. 9 janv. 2019 18:09, Bruno Baptista <bruno...@gmail.com <mailto:bruno...@gmail.com>> a écrit :

    Hi,

    Using Safeguard with OWB under TomEE fails the Fault Tolerance TCK.

    This is due to the fact that current Safeguard uses a different
    OWB lifecycle event to register deployment problems.

    The old version uses a different lifecycle event to declare the
    errors:

    public void throwExceptions(@Observes AfterBeanDiscovery
    afterBeanDiscovery) {
    microProfileValidator.forThrowable(afterBeanDiscovery::addDefinitionError);
    }

    The new one:
    void addDefinitionErrors(@Observes AfterDeploymentValidation
    validation) {
    
this.beansToValidate.stream().map(this::validate).filter(Objects::nonNull).forEach(validation::addDeploymentProblem);
    this.beansToValidate.clear(); }

    /AfterBeanDiscovery/ happens before /AfterDeploymentValidation/
    leading to a different exception being thrown from OWB.

    My guess is that /AfterDeploymentValidation/ should not be used to
    declare actual deployment problems.

    This can be verified using the code in this TomEE PR:
    https://github.com/apache/tomee/pull/365

    Executing this test: mvn clean install -Dtest=InvalidRetryDelayTest

    What would be the right approach to solve this problem?

    Cheers.

-- Bruno Baptista
    https://twitter.com/brunobat_


Reply via email to