Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rest-dev] [External] : Deprecating @Context and Supporting CDI
  • From: Santiago Pericasgeertsen <santiago.pericasgeertsen@xxxxxxxxxx>
  • Date: Tue, 25 Mar 2025 17:26:49 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=fwoZzkzFtXOCJ3YF7NkRmZILcEBROeLjYhfJp3E/1i8=; b=AWUL7jKVh/iCqMjFC1Pb6L6YwGjMHjCohd3TjVwEoG0s4iUTaoQv113Bxi7CjzUn4ewhSgZdUXpYcs8g2ostojCd+ptZW5PCylBjK+YH/w8vtqZTYPq1kifzFSYnoQj56hzD4XxLZk3xrGjclEogkDab4enbFqLCipqh5pIxRT4DOLfsPtyXvLKc5MJ9O5khcL/mNgDAZtmtHnUfrnDv53Z1sKnVOanqgycPkqqJq+85a07AYZNEK/GorQh2rb2UtA84oH4wA4i6N4LztrbeoW3tsxbBGAnAP4LSu/YrPwswaB2Mw+yuInFQRMlRmiaD9yDliHwQ0XRHWo+JtS8vmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=a9t9RlI2twK2bwcjuK5y1P2ETK4XKg5YpTuWcVRFSO3+hTf8xb2vu0YIGrweDVyVWpfM3gVy0EhmQmCbV/L4do4BNsKMQlHDIkQMxMl9DQuEXk8e3r/fgKihK4Yev5RRowenU8Dxk5kNANel51vQZhL5uHxM8qkOQHg+PXenhELyTNQFS2kac+d4Yw0OQ3WVxncVbdKyitbKfZURGf5LJLWIucX74tGVUWUHMtoOVulnDJjnzk1RVLU88qinPy1XrhhYa1re20m1q7O8XwT2G+mTe26RmxpGD73s5VdKKY5TTNf74OOymAzFDBqZElFYSiCOh1Pz6EWzmLRRooQWug==
  • 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>
  • Thread-index: AQHbnabImSzvE8lr402oCDoNQb5GybOEGtMA
  • Thread-topic: [External] : Deprecating @Context and Supporting CDI

Hi,

 Thanks for starting this James, I agree we need to get this going.

 Inlined ...

I'd like to propose we make an attempt to resolve the issue of deprecating @Context and supporting CDI.

 +1

My proposal is that we add @Deprecated(forRemoval = true) to the @Context annotation. We should probably also deprecate the ContextResolver as that can be replaced by a CDI producer.

 I suspect we have agreement on this. +1 for me.

For the client, I think we should just be explicit in the specification that if a client is running within a CDI container, that CDI will be supported.

 Yes, it must be supported. 

If it's outside a CDI container, it will not be.

 Correct.

The question there becomes, how do we support injection for resources which @Context injection previously worked on. We could just say, it no longer supports it and you need to boot a CDI container if you want that. Or, potentially, there is a way to say we support Jakarta Injection and allow @Inject to effectively replace @Context.

 We should make the transition as smooth as possible, if we can support @Context via CDI, it would be a better option IMO. However, I’d like to hear from those actually implementing the spec on this one.

— Santiago


Back to the top