Reputation: 201
If @Context is going to be deprecated, what I would one accomplish what @Context Application does (in an implementation-neutral way) when using
SeBootstrapfor instance, given that the Application subclass is instantiated using
new` which thwarts CDI?
static CompletionStage<Instance> start(final Class<? extends Application> clazz, final Configuration configuration)
explicitly states Injection is not supported.
I am seeing a CDI bootstrap problem without @Context
.
Upvotes: 0
Views: 46
Reputation: 17815
This is still something being workout in the specification. I can only speak on what RESTEasy is doing, but if you use org.jboss.resteasy:resteasy-undertow-cdi
with the SeBootstrap
API, then CDI will work for you. There is an example for this.
Upvotes: 0