Java Champion / JavaOne Rockstar Adam Bien (adam-bien.com) is a self-employed consultant, lecturer, software architect, developer, and author in the enterprise Java sector. He is also the author of several books and articles on Java and Java EE technology, as well as distributed Java programming. adam has posted 59 posts at DZone. View Full User Profile

GlassFish v3 - The Killer Java EE 6 Appserver - Top Ten Favorites

12.31.2009
| 9494 views |
  • submit to reddit

GlassFish v3 - the killer appserver for the killer platform (Java EE 6) is out. What I like: 

  1. Easy installation: you can use the installer or just download the ZIP and extract it. Even easier than Glassfish v2 - you had to execute an ANT target to install the domain.
  2. Built-in monitoring capabilities: you can monitor web applications, EJBs, JMS directly from the admin console, command line or JMX.
  3. Stability / high quality: Although I even tested the esoteric parts of the spec (like TransactionSynchronizationRegistry), It was really hard to find a serious bug. I filed some issues - but none of them would be show stopper in a real world project.
  4. Administration: You can monitor, deploy your applications and configure glassfish through the admin console, command line, direct XML editing (actually not directly supported, but works very well) and REST interface.
  5. Developer friendliness: GlassFish v3 is tightly integrated with Eclipse, IntelliJ and NetBeans. Incremental deployment of EJBs / JSF 2.0 / REST / JMS (EARs, EJB-JARs or WARs) takes < 300 ms on average - just by saving the class. If it takes considerably longer - your virus scanner is probably turned on :-). GlassFish v3 is embeddable - you can fire up your EJB container in few seconds.
  6. Lightweight nature: The footprint is rather low. You can run midrange applications with -Xmx512m. The full Java EE 6 server (zip) is about 75 MB. Together with NetBeans it takes about 145 MB (Mac OS X). The EJB 3.1 container is smaller, than 1 MB.

  7. Performance / Scalability: Glassfish V2 won some performance metrics. Glassfish v3 seems (I didn't compared them yet) to be as fast as V2. I already managed to connect with several thousands clients via Grizzly. During a load test we accidentally opened several thousands HTTP, Stateful Session Bean, JPA sessions with standard configuration. Glassfish v3 just worked.
  8. Bleeding edge: HK2, REST administration interface, update configuration, DTrace / BTrace support, JRuby, Python, PHP support.

  9. Hype compliance: Glassfish v3 is (probably) the only server which you can run on Felix and Equinox OSGi kernel. Although I successfully avoided unnecessary use of OSGi in my projects so far - it's not KISS - I was asked about the OSGi support. It is good to be able to answer the question with a double "yes".

  10. Standard compliance: Glassfish v3 is the reference implementation of the Java EE 6. It implements all required specs pretty well.

If you need some projects to play with Glassfish v3 - most of the 34 http://kenai.com/projects/javaee-patterns/ projects were developed and tested with Glassfish v3.

From http://www.adam-bien.com

Published at DZone with permission of its author, adam bien.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Jacek Furmankiewicz replied on Thu, 2009/12/31 - 9:32am

What it's missing for real-life usage is an embedded Maven plugin, like Jetty has (i.e. the ability to run of your code without the need to create a WAR or EAR). Until GF3 has the equivalent of "mvn jetty:run" it will be at a disadvantage for Maven-based shops.

So I hope the GF3 team puts some work into the Maven plugin to bring it up to speed with what Jetty offers for rapid development.

Mark Unknown replied on Thu, 2009/12/31 - 12:38pm

9.  While it can be hype, OSGi in and of itself is not.  While the benefits provided by OSGi are not needed in every project, some projects are more complicated if they don't use something like OSGi.

Btw, is KISS:

1. Keep It Simple Stupid

2. Keep It Stupid Simple

3. Keep it Simple [for] Stupid [people]

Zqudlyba Navis replied on Thu, 2009/12/31 - 3:50pm

Great. Now let's see if the future version of WebSphere Application Server (WAS) with JavaEE 6 support could catch up with the competition. 

 

My current base WAS with JavaEE 5 support takes up 4GB to install, and takes 2 minutes to start up on my local PC, just to deploy and run my 900K lines of code JavaEE app.

Henk De Boer replied on Fri, 2010/01/01 - 3:07am in response to: Zqudlyba Navis

My current base WAS with JavaEE 5 support takes up 4GB to install, and takes 2 minutes to start up on my local PC, just to deploy and run my 900K lines of code JavaEE app.
Of course, without knowing the specs of your local PC this says very little ;) Don't get me wrong, I believe that WAS is incredibly slow with starting up, but I have an old G3 450Mhz lying around that starts up a 100k Tomcat app with a dozen of JPA classes in exactly those same 2 minutes.

Henk De Boer replied on Fri, 2010/01/01 - 3:10am

You can [...] configure glassfish through the admin console, command line, direct XML editing (actually not directly supported, but works very well)
Why is direct XML editing not supported?

Also, does anyone know whether Glassfish V3 has or gets 'services'? Like a URL deployer?

Thomas Berger replied on Sat, 2010/01/02 - 6:44am

Here is what I don't like about GlassFish v3: no source code package. Why not deliver a source distribution in a zip or jar file like everyone else?

Henk De Boer replied on Sat, 2010/01/02 - 2:40pm in response to: Thomas Berger

Here is what I don't like about GlassFish v3: no source code package. Why not deliver a source distribution in a zip or jar file like everyone else?

Although I 100% agree with you on the source code package in a zip or jar that is obviously missing, I don't quite agree with the "like everyone else" part. In fact, very few projects offer a single easy to attach source code package. Until version 6.0.16 or so, Tomcat was quite a disaster too. The source code consisted out of more than 30 separate projects each with their own subdirectory containing the actual source.

Many other things, be it libraries or servers or whatever, package their source in the form of some project dir and rarely as a ready-to-attach zip of jar file.

Shaw Gar replied on Mon, 2010/01/04 - 9:40am

I have a question regarding JSF 2.0 (part of JEE6). Is Netbeans a better IDE to develop JSF (for EE6 spec) or Eclipse? I don't intend to start a flame war on IDE here, but would like to hear any unbiased opinion.

Reza Rahman replied on Mon, 2010/01/04 - 1:05pm

Shaw,

Personally, I don't have a great stake on either NetBeans or Eclipse. I've been using Eclipse for a while but have never really been very happy with it. I find NetBeans Java EE support to be much better, as well as NetBeans being a lot more lightweight.

Cheers,

Reza

Henk De Boer replied on Mon, 2010/01/04 - 1:54pm

Although I've not been using NetBeans really, judging from the examples I always see posted everywhere, NetBeans seems to have Java EE as a priority. It also offers many additional things in a simple way. E.g. NetBeans simply comes with a "Profiler" and with a "UML tool".

Eclipse on the other hand comes with TPTP, and GEF, and EMF, and literally dozens of such things. But can I use e.g. TPTP for profiling? From the description it looks like it, but then again, it also doesn't. It appears to be some foundational library to build profilers on, it doesn't seem to -be- a profiler.

Specifically about Java EE, I get the feeling that Eclipse wants to be everything for anyone, and the Java EE support is somewhere on the list (WTP), but it isn't really a priority. WTP still doesn't know about some basic J2EE 1.4 JSP features (dynamic attributes) and you can also forget about global JSF resource bundles.

I do like Eclipse a lot for their project organization and I love it for their Java editing environment (JDT). I've heard from others who used NetBeans a lot that Eclipse is really better here, but thus lacks in the Java EE, Profiler and UML tooling departments.

Shaw Gar replied on Mon, 2010/01/04 - 9:17pm

Thanks folks. I'll have to give Netbeans a try, as I'm going to venture into Java EE more seriously, and it makes sense to choose the best tool for the job :-)

Shaw Gar replied on Mon, 2010/01/04 - 9:30pm

Just one more question. If I use JEE 6 & Netbeans, can I develop JEE 5 application?

Specifically, does it offer me a chance to choose 5 or 6 when creating a new project? I'm sure the answer is Yes, but just to confirm.

I'm planning to take up SCBCD 5 certification, and it's based on JEE 5. I need an environment that's right for me to practice. Thanks!

Jeremy Flowers replied on Sat, 2010/01/30 - 6:27pm

If you want to do Grails Development with Glassfish, don't take the java_ee_sdk-6-unix.sh command.

I spent ages trying to get it working.

As soon as I took the version from glassfish.dev.java.net/downloads/v3-final.html

called glassfish-v3-unix.sh

everything suddenly fell into place

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.