OndroMih commented on PR #6212:
URL: https://github.com/apache/netbeans/pull/6212#issuecomment-1672738340

   These `isEjbXXSupported` methods are used to offer generating code. The code 
generated for different versions of EJB may be different. But I assume that it 
shouldn't break the build. So, if the project supports EJB 3.2, it's OK to 
generate code for EJB 3.0, 3.1 or 3.2. Code generated for EJB 4.0 wouldn't 
compile because it uses jakarta package prefix, so it's not good to offer it 
for projects that only support EJB 3.2 and not 4.0.
   
   The other way around should also apply - options for generating EJB 3.2 code 
shouldn't be available for EJB 4.0 projects because then the generated code 
wouldn't compile.
   
   If we want to bring back the option to generate Singleton EJBs for EJB 4.0, 
then we need to fix the generator to support EJB 4.0 and `jakarta` prefix. This 
is what I think has been done for Stateless and Stateful, but not for Singleton.
   
   What I suggest to do with `isEjbXXSupported` and similar methods, is that we 
allow one exception - if EJB 4.0 is the latest version of EJB, then Netbeans 
offers generating EJB 4.0 code also for any newer EJB version, e.g. EJB 5.0. If 
EJB 5.0 introduces a breaking change, then older versions of Netbeans would 
allow generating EJB 4.0 code with EJB 5.0, which could generate code that 
doesn't compile. But this would be treated as a bug and newer versions of 
Netbeans should fix that and change the `isEjb40Supported` method to not allow 
EJB 4.0 code generation for EJB 5.0+ projects.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to