Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 "Contexts and Dependency Injection" choices for New #6875

Open
richard-grin opened this issue Dec 22, 2023 · 4 comments · May be fixed by #7958
Open

2 "Contexts and Dependency Injection" choices for New #6875

richard-grin opened this issue Dec 22, 2023 · 4 comments · May be fixed by #7958
Labels
Java EE/Jakarta EE [ci] enable enterprise job kind:bug Bug report or fix

Comments

@richard-grin
Copy link

Apache NetBeans version

Apache NetBeans 20

What happened

Right clic on a project, choose New > Other. In the list displayed, "Contexts and Dependency Injection" and "Contexts and Dependency Injection (Jakarta EE)". Is it normal? If it is, it would be good to explain better when to use one rather than the other.

Language / Project Type / NetBeans Component

Java

How to reproduce

Explained in "What happened".

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11 Family 64-bit, version 21H2

JDK

17

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

@richard-grin richard-grin added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Dec 22, 2023
@matthiasblaesing
Copy link
Contributor

What would you suggest? When Oracle decided to drop JavaEE and donate code to the Eclipse Foundation, lawyers/marketing were involved. The JavaEE name was not donated and some clever soul thought, yeah, then the package name has to change. This in turn kills compatbility between JavaEE and JakartaEE. The package names and XML namespaces were changed.

That schism will hunt us for the next decade. CDI is one of the places where it pops up. You have to choose which is the right namespace.

@richard-grin
Copy link
Author

richard-grin commented Dec 22, 2023

If the difference between the two choices is only the names of the packages, name them "Contexts and Dependency Injection (javax)" and "Contexts and Dependency Injection (jakarta)". It's clearer because the first versions of Jakarta use javax (Jakarta 8 or 9).
Another better solution (is it possible in a NetBeans wizard?) would be to read the version of web.xml or beans.xml, or something similar that distinguishes the versions of Jakarta EE (and Java EE) and decide to use jakarta or javax in the packages.

@mbien mbien added the Java EE/Jakarta EE [ci] enable enterprise job label Dec 24, 2023
@matthiasblaesing matthiasblaesing removed the needs:triage Requires attention from one of the committers label Nov 13, 2024
@matthiasblaesing matthiasblaesing linked a pull request Nov 13, 2024 that will close this issue
@matthiasblaesing
Copy link
Contributor

matthiasblaesing commented Nov 13, 2024

@richard-grin should be fixed by #7958. Development build available from Checkspage or directly.

Would be great if you could test.

@richard-grin
Copy link
Author

richard-grin commented Nov 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java EE/Jakarta EE [ci] enable enterprise job kind:bug Bug report or fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants