How many times have we heard that LAMP or .NET is better than Java EE? There’s an interesting discussion about this going on over at The Server Side.
I for one will be sticking with Java EE. I think frameworks like Spring, Hibernate, Struts, EJB3 are all things I wouldn’t like to give up. Java has made huge leaps forward in the last year or so, lets hope the momentum keeps going.
I’ve just taken my first steps in EJB3 and started writing some small sample applications so that I can get up to speed on it.
I’ve been doing J2EE for some time now so I thought I’d have a look at the new EJB 3 stuff and see how it differs. I’m a fan of JBoss, which provides a version of EJB3 on JBoss 4.0.3RC1. The EJB3 support can also be ported to run on JBoss 4.0.2.
Installing JBoss with EJB3 support is a doddle. I used the webstart installer on the JBoss website and installation proceeded smoothly without any problems. During the installation, you are asked which configuration of JBoss you want (all, default, ejb3 etc.). Both the all and ejb3 configurations provide EJB3 support.
So far, I’ve primarily been looking at Session beans. I’m impressed at the lack of verbose XML that needs to be written to deploy the beans (i.e. there was none!). The lack of boilerplate code required to develop these beens is very impressive, in fact my ant script was by far the most complex thing in my sample project.
I’ll post some more comments as I delve deeper, but so far I’m impressed and I think EJB3 is a large leap forwards in J2EE
NetBeans 4.1 has built in support for Sun App Server and Tomcat 5.5. There is also a Server Plugins project for NB that adds support for JBoss 4, WebLogic 9 and WebSphere 6. The server plugins project is currently classified as experimental.
Currently the only way to try these plugins is to build NB and the required plugins – you can only download the source for them at the moment. Downloading and building is a easy process, albeit rather lengthy. Full details are given on the server plugins home page, but basically to download from CVS and build on Windows you need to do the following.
rem Create a directory to store and build NB in.
rem Setup CVS
rem login to CVS - no password required.
rem download NB relase 4.1 source
cvs -z 6 co -r release41 -P stable
rem download server plugins source
cvs -z 6 co -P serverplugins
rem build NB
rem build JBoss plugin
rem change into the weblogic9 or websphere6 directories
rem and run ant to build these plugins.
Once this is all done, there should be a netbeans/bin directory from which you can run the freshly build NB with the new server modules.
Starting up NB and selecting “Tools – Server Manager” allows you to now add a server instance for JBoss, WebLogic or WebSphere.
I tried building the JBoss 4 plugin and it integrated correctly with my JBoss 4.0.2 installation. I was able to create an enterprise app from within NB and deploy and run it successfully to JBoss 4 – all from within NB.
I was reading the Project Conventions for Enterprise Applications today which is published on the Java blueprints web site and wondered how many people follow these guidelines? Do you follow these guidelines, or do you let your IDE take control over your project structure?
I’ve just found this article (Adding Charts to Web-Based J2EE Applications) by Michael Klaene over on developer.com. Looks as though that could be very useful.