Martin F
Martin F

Reputation: 201

CDI in Jakarta REST without @Context (deprecated)

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 usingnew` 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

Answers (1)

James R. Perkins
James R. Perkins

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

Related Questions