Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rest-dev] CDI Integration and the @Context annotation
  • From: James Perkins <jperkins@xxxxxxx>
  • Date: Fri, 9 Oct 2026 16:58:17 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ibm.com; dmarc=pass action=none header.from=ibm.com; dkim=pass header.d=ibm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ots8g/xWEu9lNEthhYqlaorAX+FUh/qoRPhQGJ1vrhQ=; b=nDZKVNzlHb44YToyVx1ieq9eLvhcWwVh/wOsgN4fwYJa6fbsd3Efxlq7h2flJ5DR17bNRLGeJkrFb9pvKkco+R2h94HutG5t27Elpiq3wFeCni29Axv733yNx6+h4Sdfv0GSymh8cDhystF1FThkXUUO544XT7OJcJVQKVOMpsPP0WBwKFH0frp6QlDHapTVmaVOMZsNOk9UMPpe+FKkhyUFjtlFc5+S0chg0CTMMRRY93wibV3OU81y/dyb+vnPZsii57DJq+Q5RAiitKRGylhyuYx+T5qNL4SiNbIZye5K5vFy45oNppeEHUC27UVhtSF5XnSHLd+mNTy6/aveXA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AhPBMzrzXtOXtG09rtIgkx8kABWfG88A4BCp3nwqkaUYi7JAHNr1qndh5C+JLckaUWqJv2jxgnn75Qwwonka0Rw7tiPJiKugpqFbPdY8CMRwMV8r+kpovtS8O30j6+DOCKCbbfWn27V5/Rm8Nj38G1wy+RRIh768Nmb8QG8t58hkZ/CqJeTeuIZoigYO7fEt6bWQq8NnLxhYNEiz8atsUMkCmBU3z3aoct4u/msqsSa/eSajbjACa8cuu+WIqoF01WC+5Pw2chD0z/KANCzQSAOh2XbTpdzOKdvBRcIJNhjdyqIhu7I1gm1mSeqqD+PE7uMp4jMVtH8NtNJuhXHdRA==
  • Delivered-to: rest-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/rest-dev/>
  • List-help: <mailto:rest-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/rest-dev>, <mailto:rest-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/rest-dev>, <mailto:rest-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHdWAxdSjReQx78aU6ZAq7+qlJ7vw==
  • Thread-topic: CDI Integration and the @Context annotation

Hello All,
This week I've been working on integrating Jakarta REST 5.0 CDI integration into RESTEasy. I've found a couple minor issues we'll need to address in the spec. However, I'd first like to talk about @Context. We deprecated that annotation, but now I'm wondering if we should instead make not deprecate it and make it a CDI qualifier. The biggest reason for this would be we do need some kind of a qualifier to inject the `ServletConfig` and `ServletContext`. If we don't have a qualifier, then there is a chance we get the wrong instance injected. Making the `@Context` a CDI qualifier would allow the implementation and user to know they're getting the correct instances injected.

The other two issues are more minor and just documentation changes I hadn't thought about until I fully implemented some things. I'll send up a PR those and for making the @Context a CDI qualifier, but that will be a separate commit in case others disagree. It will make it easier to delete.

James R. Perkins
Software Developer 

IBM

Back to the top