NetBeans IDE 5.5 Beta 2: Complete Java EE 5 Bag of Tricks for JBoss Users

I had a pretty rough time today, trying to work out how to reinterpret the EJB 3.0 Enterprise Beans tutorial, which was written for the Sun Java System Application Server, so that it would work for JBoss. It "should" work the same out of the box, but there are a few differences, for various reasons. The complete Java EE 5 narrative is center stage here in this tutorial. First, you create an EJB module that, in the case of JBoss, uses Hibernate by default for persistence. During this wizard-driven stage, a persistence unit is generated for you by the IDE. Next, you create an entity class that provides a String called "title" and a String called "body". Then a message driven bean and a session bean are created—of course, each artifact here is created via wizards, which provides annotations generated in the code. Finally, you create two servlets—one for displaying messages in a list and the other for posting messages.

Mostly you're generating specification-compliant code, which needs to be customized in a few places to tailor it to the tutorial application. At the end of the day, there's hardly a Java EE 5 artifact (other than JAX-WS) that you haven't dealt with. As stated, I had a pretty hard time getting it all to work for JBoss 4.0.4. But not to worry when you've got great colleagues like Brian Leonard, who seems to have flown through the tutorial, made some minor-looking tweaks for JBoss and delivered a colorful and intriguing application, with this content:

Maybe you'd like to try this sample yourself? Requirements are that you've got NetBeans IDE 5.5 Beta 2 and JBoss Application Server 4.0.4. Comments at this stage are more than welcome, since the tutorial is being worked on and feedback can still be integrated. Download the sample here, install it, and then find it in the New Project wizard's Samples/Enterprise category. The project's name is "News App". When you get that application from the wizard, resolve the reference in the web application by attaching the EJB module project to the web application's Libraries node. That's it. And then the application should build and run and you should see the servlet display its HTML in the browser. Fill in a title and a body and click the button and you'll see the result.

Here's the application:


Have fun with it (and learn from it, if you're interested in Java EE 5) and remember that feedback is welcome.


Very nice, but it would be even more helpful to have more articles about the Wicket support plugin, as this would help others make support for other frameworks too.
At the moment Eclipse captures the attention of most developers that make plug-ins for the different frameworks, and the lack of netbeans documentation and examples in this direction might be a reason.

Thanks in advance,


Posted by Ahmed Mohombe on August 07, 2006 at 11:58 PM PDT #

Hi Ahmed, in my update center, there's a sample called "Wicket Framework Provider" (you can see the sample included in the screenshot in this blog entry). You can get that sample and adapt it as a starting point for your own framework. Are there specific things you'd like to see discussed in this area in this blog? I could create a tutorial for framework support -- what subjects do you want the tutorial to cover?

Posted by Geertjan on August 08, 2006 at 12:03 AM PDT #

Thank you for the link, but I'm aware of all the public available resources and I'm also checking periodically the status of the nbwicketsupport CVS :) .
With framework support I mean MVC framework support(since that's where the a plug-in can really improve the productivity), and Wicket is the best example possible.
IMHO the best way would be just to continue the Wicket development to be more complete (like JSP or JSF? support), and write articles for the different steps (same as you did till yet). IMHO it is very important to exemplify everything on the same plug-in not every small feature on new one. This way in short time the Wicket plug-in could be "complete" and usable by both wicket users(as a complete tool), and plug-in developers(as a complete example).
Also it would be good to rework/reorganize/restructure the acutal tutorials in order to include the observations mentioned in comments (if any) and simplify the steps and make them correspond to what a developer can see making them. Due to NB version changes some of them do not correspond 100%.

Without wanting to start a flame, IMHO it is strange that no one from the Wicket community is helping this project (at least from the lists or coments or what one can publically read), even if they are not spoiled with too many tools/plug-ins, so should be more grateful that you started to develop a plug-in for Wicket not something else (let's say Tapestry) :). Maybe some special requests from your side would be needed in order to move things forward :).

I'm looking forward to see the progress on the plug-in dev front :).

Thanks in advance,


Posted by Ahmed Mohombe on August 08, 2006 at 12:44 AM PDT #

Hi Ahmed, thanks for the comments. Reason for the delay is that you've given me food for thought. The point is that creating basic framework support is simple. I can create a tutorial about getting started with that, hope to do it soon. I agree also that it would be nice if there were more contributions with the Wicket plugin for NetBeans, I will give more attention to this soon. (Maybe you yourself would like to contribute in some way?) Thanks for your comments and keep checking this blog, because there'll be useful info on this topic soon.

Posted by Geertjan on August 10, 2006 at 12:06 AM PDT #

You may want to add a redirect in the index .jsp page like so: String redirectURL = "http://localhost:8080/NewsApp-war/ListNews"; response.sendRedirect(redirectURL); So people who aren't actively reading the tutorial get taken to the ListNews page.

Posted by guest on August 10, 2006 at 06:37 AM PDT #


Posted by guest on November 01, 2006 at 02:13 PM PST #

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.


« August 2016