Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdi-dev] About parsing beans.xml files in Lite
  • From: Manfred Riem <m_riem@xxxxxxxxxxx>
  • Date: Mon, 25 Jan 2021 19:01:48 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xe8xeVyA3YCBPWkWMjQtl8lwiXd3WacnKQ2eiaqKw9I=; b=PBDM4FZ3RlVad+mXKWB4HAD6QZ/tVh7cG49gqLvIBi1SjIMXZx5Idhm0zDYr1joQzTCCEtfHFVrdDh6mB0GquEcaeOHRPthhzcFs6aQ/eMa1p/hqJ+7c1ZM48DQaGukeWfo0mG4Q1QfsBngt3u/0QVQlbXgOi3/2TsP4AiM7wrF9iM36afapzVrH1rDw/S3s4jY3+kpMMPUvEv8mdxnC1b0LKMf3IysRREw50KjQqImGLCET5ywbxICevR8z8qbhj6el8l8v54pr9BoALux7FTB7MVOyaxj2XZFlW2SbIa38JR7hEH/n+r/OMI8iy3bfHjcPpiF3UPA9WH/cQDfBBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oUhn5IzvXx735qWHsAnPRxYS/nfqKlqLeQtvFnRvKJOnepFhim/cXIBKOduvS43/ZhFBhj8XmkSVeL/EUk5bgj0q8G/5B3DtkFfoJeGalk285PbhsU1kzVN7POLSeAR0LdoVb7jJDbbHnqidfO7qcBVMly3+fmojOUJI37MlAk45acP3JkPRcDDBbP7qTwF7jHoJjKD+xKeC9PK9THsbofiqtYZ+6ZCxMbRWlN1fw2vKT06ChvZIzPxn+DUeCHiQSBduXfrhhgrFUkgb/weq419H/142K+VRdONwD3yWrh5Tu5yBghXQbe9BnRIpkWoiRnn+5owcPg+erXYD31QG7Q==
  • Delivered-to: cdi-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/cdi-dev/>
  • List-help: <mailto:cdi-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdi-dev>, <mailto:cdi-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cdi-dev>, <mailto:cdi-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: reQXM5giyn30KzavmDp2LwUk75YIhOWjm0OAgAUmcICAA7segIACBDKAgAjm1ACAAH5sEIAAQ7cAgAAAQgCAAAeigA==
  • Thread-topic: [cdi-dev] About parsing beans.xml files in Lite

Hi all,

 

What is the key defining feature that makes it different from “regular” CDI?

 

Is that something someone can describe in a one liner?

 

Thanks!

 

Kind regards,

Manfred Riem

 

From: cdi-dev <cdi-dev-bounces@xxxxxxxxxxx> On Behalf Of Werner Keil
Sent: Monday, January 25, 2021 11:34 AM
To: cdi developer discussions <cdi-dev@xxxxxxxxxxx>
Subject: Re: [cdi-dev] About parsing beans.xml files in Lite

 

I would not use the word „Native“ because it sounds like JNI ;-)

 

Werner

 

Gesendet von Mail für Windows 10

 

Von: Reza Rahman
Gesendet: Montag, 25. Januar 2021 19:33
An: cdi developer discussions
Betreff: Re: [cdi-dev] About parsing beans.xml files in Lite

 

How about calling it CDI native compilation profile or native profile or static profile?

Reza Rahman
Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

On 1/25/2021 9:31 AM, Manfred Riem wrote:

Hi all,

 

I couldn’t agree more with Mark on this one. If it is not a proper sub set but instead borrows concepts from CDI

it really is not CDI Lite. Naming is important as it can cause a lot of confusion if done wrong!

 

Thanks!

 

Kind regards,

Manfred Riem

 

From: cdi-dev <cdi-dev-bounces@xxxxxxxxxxx> On Behalf Of Mark Struberg
Sent: Sunday, January 24, 2021 11:59 PM
To: cdi developer discussions <cdi-dev@xxxxxxxxxxx>
Subject: Re: [cdi-dev] About parsing beans.xml files in Lite

 

Once again: if CDI-lite is not binary and otherwise just a subset of CDI, then PLEASE find a different name for it.

 

What you want is more like a JSR-330 container with some sprinkles from CDI features here and there - but with a different API. 

Yes you probably started at CDI mind wise, but now you are somewhere completely else. Please do not trash CDI by adding something else!

 

Or to say it in different words:

 

If you call it CDI-lite, then people expect that they will be able to run those libs on a fully blown CDI server as well.

It this is not the case (because the API is different), then please don't call it CDI-lite. The spec might still be valuable, but please go find another name!

 

LieGrue,

strub

 



Am 19.01.2021 um 16:02 schrieb Emily Jiang <emijiang6@xxxxxxxxxxxxxx>:

 

On 16. 01. 21 0:16, Emily Jiang wrote:

> As a matter of fact, we currently pour everything into a singular bean archive (which I have to say I came to like as it makes understanding the meaning of bean archive much simpler for users).

Ah that is a great point, totally forgot about that! I think we should
do this in Lite. Multiple bean archives made everything really confusing
for me when I started learning CDI.

 

This approach leads to the complication of merging beans.xml. What if the beans.xml has conflicts, which one takes precedence.

The proposal is that in Lite, we don't take beans.xml content into account. We "only" use it as a marker file to find JARs that should be part of the "singular" bean archive. So that is a non-issue, and, in fact, simplification :-)

What about enabling interceptors via beans.xml? Would the enablement be done via @Priority only? Your suggestion of discarding the contents of beans.xml is quite a big change.

> Tomas Langer also correctly mentioned that today you can have beans.xml with discovery mode "none" and therefore the presence of beans.xml can mean you don't want to process that archive.
> This is true, although I have to point out that I haven't really seen this used much. It is probably a remnant of CDI 1.0 where default discovery mode was explicit (instead of annotated) and where you needed to always have beans.xml present.

The only reason why I think we might want to detect beans.xml
configuring discovery mode to "none" is legacy JARs. Not sure how big of

a use case that is.

 

Open Liberty uses this for improving performance for migrated applications. The applications used CDI 1.0 and then migrated to CDI 1.2/2.0. Setting bean-discovery-mode="none" will disable the scanning, which improves the performance.

What I'd like to understand is, how much is that relevant when it comes to Lite? My guess would be: not much.

My statement was about the use case assessment.

 

On Mon, Jan 18, 2021 at 8:15 AM Ladislav Thon <lthon@xxxxxxxxxx> wrote:

On 16. 01. 21 0:16, Emily Jiang wrote:

> As a matter of fact, we currently pour everything into a singular bean archive (which I have to say I came to like as it makes understanding the meaning of bean archive much simpler for users).

Ah that is a great point, totally forgot about that! I think we should
do this in Lite. Multiple bean archives made everything really confusing
for me when I started learning CDI.

 

This approach leads to the complication of merging beans.xml. What if the beans.xml has conflicts, which one takes precedence.

The proposal is that in Lite, we don't take beans.xml content into account. We "only" use it as a marker file to find JARs that should be part of the "singular" bean archive. So that is a non-issue, and, in fact, simplification :-)

> Tomas Langer also correctly mentioned that today you can have beans.xml with discovery mode "none" and therefore the presence of beans.xml can mean you don't want to process that archive.
> This is true, although I have to point out that I haven't really seen this used much. It is probably a remnant of CDI 1.0 where default discovery mode was explicit (instead of annotated) and where you needed to always have beans.xml present.

The only reason why I think we might want to detect beans.xml
configuring discovery mode to "none" is legacy JARs. Not sure how big of

a use case that is.

 

Open Liberty uses this for improving performance for migrated applications. The applications used CDI 1.0 and then migrated to CDI 1.2/2.0. Setting bean-discovery-mode="none" will disable the scanning, which improves the performance.

What I'd like to understand is, how much is that relevant when it comes to Lite? My guess would be: not much.

LT

 

Thanks

Emily

 

On Tue, Jan 12, 2021 at 4:37 PM Ladislav Thon <lthon@xxxxxxxxxx> wrote:

On 12. 01. 21 17:26, Matej Novotny wrote:
> As a matter of fact, we currently pour everything into a singular bean archive (which I have to say I came to like as it makes understanding the meaning of bean archive much simpler for users).

Ah that is a great point, totally forgot about that! I think we should
do this in Lite. Multiple bean archives made everything really confusing
for me when I started learning CDI.

> Tomas Langer also correctly mentioned that today you can have beans.xml with discovery mode "none" and therefore the presence of beans.xml can mean you don't want to process that archive.
> This is true, although I have to point out that I haven't really seen this used much. It is probably a remnant of CDI 1.0 where default discovery mode was explicit (instead of annotated) and where you needed to always have beans.xml present.

The only reason why I think we might want to detect beans.xml
configuring discovery mode to "none" is legacy JARs. Not sure how big of
a use case that is.

LT

_______________________________________________
cdi-dev mailing list
cdi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdi-dev



--

Thanks
Emily



_______________________________________________
cdi-dev mailing list
cdi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdi-dev

_______________________________________________
cdi-dev mailing list
cdi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdi-dev



--

Thanks
Emily

_______________________________________________
cdi-dev mailing list
cdi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdi-dev

 

 

_______________________________________________
cdi-dev mailing list
cdi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdi-dev

 


Back to the top