Java EE 6 and NetBeans IDE 6.8

I attended a meeting yesterday about Java EE 6 features in the upcoming NetBeans IDE 6.8.

Some notes:

  • The main emphasis is on the 'Web Application' project type, since EJBs can now also be created within web applications. The thinking is that other web-related project types, for EJB modules, app clients, and Java EE applications will be less used from NetBeans IDE 6.8 onwards.
  • GlassFish v3 is the only server currently supporting Java EE 6. It is based on OSGi and is therefore modular. Therefore, only if this server is selected in the Web Application project wizard, can Java EE 6 be selected from the Spec Version drop-down box.
  • Facelets, which is now part of the Java EE spec, is the default page language if JSF is chosen in the "Frameworks" panel, though "JSP" can also be selected.
  • The Web Application project wizard will create a Facelets template and an XHTML file that references the Facelets template will be the welcome page of the application. (But if there is no web.xml [see below], where will this be set?)
  • The 'New JSF Pages from Entity Classes' wizard will generate Facelets instead of JSP, if Java EE 6 is set as the project's spec version.
  • Facelets file type support in the editor consists of code completion, documentation popup, expression language completion, and expression language source navigation. Tags for all available libraries on the classpath will be available in code completion, then the IDE will add the relevant declaration for the selected library to the top of the file.
  • No web.xml file will be needed anymore, everything that used to be set there can now be set via annotations. Therefore, no web.xml file will be created anymore via the Web Application project wizard.
  • There is a file-level wizard for JSF composite components.
  • EJBs can be created in the web application via the related wizards. This simplifies the build and the packaging of EJBs, since they'll be in the WAR file instead of a separate EAR file.
  • Instead of servlets, Java EE 6 applications are more likely to use RESTful web services. Several powerful file templates are available for these in NetBeans IDE 6.8 (which were also there previously).
  • AJAX support in Java EE 6 is supported in NetBeans IDE 6.8 via code completion (and other editor features) within the Facelets files.
  • It is possible to change a RESTful web service into an EJB, via an annotation, and it is also possible to inject EJBs into a RESTful resource.
  • There's a new possibility of creating a singleton EJB, instead of stateless/stateful.

Other references:

Java EE 6 in NetBeans IDE 6.8 Milestone 1


Currently (4 or 5 days ago), the support of Facelets in the Netbeans nightly builds is really suboptimal: the editor shows lots of errors and warnings, even in the Netbeans generated code.

Posted by jiai on September 09, 2009 at 05:54 PM PDT #

"really suboptimal" is not an appropriate term to use while a product has not been released yet. In that case, the term is "really under development".

Posted by Geertjan on September 09, 2009 at 10:24 PM PDT #

There is no plan of the embeded ejb container support for lightweight outside-container test.

Posted by hantsy on September 10, 2009 at 01:06 AM PDT #

@hantsy: EJBContainer.getContainer() is a standard API in EJB 3.1 which you can use with glassfish/lib/embedded/glassfish-embedded-static-shell.jar (requires full GlassFish v3 install)

Posted by Alexis MP on September 22, 2009 at 06:11 PM PDT #

err, make that EJBContainer.createEJBContainer()

Posted by Alexis MP on September 22, 2009 at 06:13 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« May 2016