Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rest-dev] Update Jakarta REST to Use CDI
  • From: James Perkins <jperkins@xxxxxxx>
  • Date: Mon, 13 Apr 2026 14:22:18 +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=q5aTW6iMuc0bRd9mwrL5x2oLk42Ae7tLpDiiEMaJXqE=; b=Hx/zv9jTy3/JU8rOSvYSR/wRorLYC2sD+2vQWGcfr7InkNeHHqkEwSgG+F48N70OnTRw9ON1EicPQq/dgAwywsTj+LBYMYVCB864kb04l5hvG9F9stq+qjrQOF7BtjWU/MxOy/WyW4Qoxi7z9QxkWIlLfTbuMS8srLxYV8CpQU7OFQ8agn0TyOxP+wiK/em1RFpDeYA5N5fAdj6TEkcvzF+ANc5blMNaqE12vp+QA2swmwE9/rgqKCnfeeJNQGWyZ65RQGBFsnbeXItTIl0wAFQuKdV/L/fxKNA9gtOk1CGyoWKiHeNJDybWlrmmkPFpffevU59qy0gfsg4B97LGnA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ObR3f0X2L4EFLHRpXmnHhjfXSZbXrjGZvOM5dVere8h5OXX2/0DVfbRYK4rQz57wd3vmUUR3D/Ag/9wdTGR1By8U7LzEIuyuf0gFe29r/agISUn3SWe3AQXyKkuKFR/ytzOjRiMXeb1ErdN6kcib0Mv06ioBmloZ4mz6fov8/3vyJXR1Z/wdK7n01xse/uMQT/sQ5ErKYKODh4Ce4IpoVTyhmsKUKhEZTRex7Nkj8PKoL1apbuYz0Cv4a68oLPlwzGaFdRHTVMc0w7x3+fnpxnIwRRYfIO1xLhtHJc5WsMCR8Mi4HGQHwJYYxABFOjKY/fUhAJonqNFgCrVAvum92Q==
  • 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: AQHcy0es6b468cH+802iubWxFI+vTA==
  • Thread-topic: Update Jakarta REST to Use CDI

Hello All,
I've submitted a draft PR for updating the Jakarta RESTful Web Services specification to officially deprecate @Context and use CDI, see [1] https://github.com/jakartaee/rest/pull/1340.

This has received some minor reviews, but we could use some bigger ones overall. The Jakarta Platform team would like it if we could have a milestone on May 15th. This is about a month away.  If those involved in the specification could give this a review that would be helpful. 

What this draft PR does lack is some additional TCK testing. This is something I can add, but I need to add the assertion JavaDoc's to the test I added.

One concern I have with the PR is using the @EntityParam annotation for the content parameter. There is no way to differentiate a method which uses CDI from a method that uses the old pattern of any non-annotated parameter is the entity/content. I'm really not sure how we solve that without always requiring the @EntityParam annotation on the entity/content parameter. This would require us change ALL TCK tests which use content to use the new annotation. It would also require a quite heafty migration path for users and libraries.

One option might be to simply not allow CDI injection for methods. This seems like the simplest option and then really the @EntityParam annotation can just be removed.

I'm open to other thoughts and opinions 🙂  


James R. Perkins
Software Developer 

IBM

Back to the top