Hi Will, You are correct, we have been talking past each other. As far as I know, the "Enterprise Application" option of NetBeans is there for historical purposes. I haven't written enterprise code in that manner for a number of years, as over the past several years Java EE and Jakarta EE have evolved in such a way that they no longer require multiple projects to develop with specs such as JMS or EJB.
Unfortunately, I haven't worked on the internals of Apache NetBeans "Enterprise Application" module components which are used to create such projects. I have only worked on the Maven "Web Application" module, which can be used to deploy to full stack Java EE containers, such as GlassFish, Payara, and WildFly servers. If you are interested in building out support for the "Java with Maven" -> "Enterprise Module" option, please fork Apache NetBeans, and modify it to use a suitable archetype for your requirements. Thanks and best regards. Josh Juneau [email protected] http://jj-blogger.blogspot.com https://www.apress.com/us/search?query=Juneau <https://www.apress.com/index.php/author/author/view/id/1866> On Thu, Jan 28, 2021 at 11:34 PM Will Hartung <[email protected]> wrote: > On Thu, Jan 28, 2021 at 7:49 PM Josh Juneau <[email protected]> wrote: > > > Sorry, but there must be something incorrect with the Java EE 8 project > > archetype that you are using. When I use Apache NetBeans to create a > Java > > EE 8 project, I select the following: > > > > - New: "Java with Maven" -> "Web Application" > > > > This creates a single WAR project with a working JAX-RS web service. I > am > > not sure which archetype you are referring to that creates 4 related > > projects, so we need to figure that out. > > > > Then we've been talking past each other. > > Since way back in the day, we've had "Servlet" containers, i.e. Tomcat, and > "Java EE Containers", i.e. Glassfish, Welogic, WebSphere, JBoss. The > Servlet containers came first, of course. > > The JEE specification is a composite of several different specifications, > including the Servlet, EJB, JTA, JCA, and other specs. > > Tomcat is not a "JEE Container". TomEE is a modern JEE Container that > happens to bundle Tomcat. The web tier of Glassfish was originally a fork > of Tomcat long ago. > > So, when I talk about a "JEE Application", I'm not talking about a simple > WAR, suitable for Tomcat. I'm talking about something suitable for a JEE > Container. > > Historically, there's been a demarcation between the web tier of a JEE app > and the application, i.e. the EJB, tier. And they were packaged separately > in individual artifacts that were then combined in to an overarching > Enterprise Application aRchive, the EAR. Today, this demarcation is not > absolutely necessary, since Session Beans can be part of a WAR today (on a > JEE Container, not in Tomcat). But Message Driven Beans (among other > things) can not be part of a WAR. > > The "Java with Maven" -> "Enterprise Application" is that project type that > I'm referring too, along with "Java with Maven" -> "Enterprise Module" > (which is NOT a WAR). > > The NB Enterprise Application wizard prompts for the JEE version, for the > name of the mother project and child overarching EAR project, and then > whether you want an EJB, WAR, or both modules for that EAR. Internally, > it's 4 Archetypes orchestrated together by the internal NB code. Bases on > the options, you will end up with 2, 3, or 4 related projects. > > The JEE 7 part uses the 4 archetypes. The JEE 8 version, does not. The code > in the wizard for JEE 8 is completely ignorant of the JEE module > relationships. However, the JEE 7 part is also broken, it seems to have > some issue properly invoking Maven. > > Historically, I've always been clear when I talk about JEE to mean the > "Enterprise Application", I never conflate "web apps" or "tomcat" with JEE > (not that you'd know that, of course). Many historically have not made the > distinction. > > So, from an "Enterprise Application" POV, NB 12.2 is unusable in terms of > actually creating a skeleton application, or module, via the wizard. Given > a proper existing project, it seems to work fine. But it can not create one > on its own. > > If you have a NB 11 instance hanging around, creating an Enterprise > Application for JEE 7 works fine in NB 11. > > I hope this clarifies the issues that I'm encountering and have been > discussing. > > Best regards, > > Will Hartung >
