Skip to content

Commit

Permalink
Move per-Arquillian cleanup from before bean discovery to before CDI …
Browse files Browse the repository at this point in the history
…shutdown, now that the clean-up is in the RegistryFactory stop rather than start method
  • Loading branch information
tjquinno committed Jul 12, 2023
1 parent 157f32c commit 48b19a3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@

import jakarta.enterprise.event.Observes;
import jakarta.enterprise.inject.spi.BeforeBeanDiscovery;
import jakarta.enterprise.inject.spi.BeforeShutdown;
import jakarta.enterprise.inject.spi.Extension;

public class MetricsTckCdiExtension implements Extension {

void before(@Observes BeforeBeanDiscovery discovery) {
RegistryFactory.getInstance().start();
discovery.addAnnotatedType(ArrayParamConverterProvider.class, ArrayParamConverterProvider.class.getSimpleName());
}

void after(@Observes BeforeShutdown shutdown) {
RegistryFactory.getInstance().stop();
}
}

0 comments on commit 48b19a3

Please sign in to comment.