epesh
I'm Joseph Ottinger, editor of TheServerSide.com.

Calendar

««Nov 2009»»
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

My Bookmarks

My Top Tags

                                       

Mailing List

My RSS Feeds








Search Box

 

Glassfish b45 review

posted Monday, 1 May 2006
I've been playing with Glassfish for a while now, for a number of reasons: I need to learn Java Enterprise Edition (the new specifications), I want to find out what I can expect from Sun Application Server 9, and – lastly, perhaps most important – I have a requirement for an application that will make my job easier and my output better.

So far, Glassfish has been quite nice, except for a few issues. Overall, memory usage is acceptable; the console is functional, and the APIs implemented are, obviously enough, the standard by which everything else will be judged (since it's the reference implementation for Java Enterprise Edition.)

The user community for Glassfish is very responsive. I've fired off a few boneheaded queries to the mailing list, and gotten very rapid response (in two cases, resulting in bug reports, and in other cases, resulting in explanations of why my code was, well, wrong.) The community was quite impressive.

However, there are still areas that could use improvement, and a few showstoppers.

For one thing, the database pooling seems to be a little... unreliable. I've encountered a number of cases where, using only the persistence engine (i.e., EJB3), I've run out of available connections for a given pool, and the application server is unable to recover. This has been seen with the bundled JavaDB (a version of Apache Derby); I haven't tested other databases, partially because I'm specifically limiting myself to the Glassfish bundle for the moment.

I've seen the same behaviour with multiple redeployments of a fairly large enterprise application, but given the occurrence with a fairly stable (and small, clocking in at 2.1MB) application, I'm of the opinion that the database pooling mechanism isn't quite up to standard yet. (This is unconfirmed, mind you. I could be completely wrong, and my code might be leaking connections like mad – but I'm not actually managing any of the connections, so I doubt it.) The hang is very frustrating, as it pegs the CPU at 100% usage, which makes the process a bit difficult to kill.

The application I'm using as a test leveraged JMS quite a bit – a single web page change can fire off forty messages, and those messages might result in 400 new entities being created, or 400 changes to existing records. (Or more, honestly.) This would have been classified as a horrible abuse in EJB 2.1 or earlier, potentially creating massive scalability problems, but Glassfish handled the simpler test cases with no problems, with the exception of the server hang mentioned previously. When the application I'm testing runs, it runs very quickly.

JSF runs very well in the application server. I have not had a chance to profile it yet, but the console application is using JSF itself, and it's very responsive.

The console functionality itself is sufficient. There are a lot of monitoring options, and logging controls are built into the console. The only gripes I have about the console are in deployment capabilities (specifically, I'd like the ability to tie local JNDI references to server references at deployment time, through the console) and certain diagnostics (i.e., “how many JDBC connections am I using?” and the ability to examine the JMS queues through the console.)

Documentation on Glassfish is still a little odd. It tends to be spread across multiple documents (a la the traditional Sun documentation method) and focuses fairly rarely on being task-oriented. However, once the general concepts behind Java EE development and deployment are understood, the console makes the tasks easy enough.

It should be noted that some people are using Glassfish in production, despite its unreleased state and the issues I've found in it. Overall, I've found Glassfish to be sufficient for learning Java EE, and I have high hopes for the few flaws it has being fixed in the near future.

tags:        




1. Tom left...
Monday, 1 May 2006 12:17 pm :: http://www.itdisasterrecoveryplan.com

Hello,

This is a nice way to show your world to the people, I hope you get many readers.

I'm working on a disk data recovery site. It is not easy to find good content for disk data recovery websites but I try to do my best...I also have a blog there


2. Nazrul Islam left...
Monday, 1 May 2006 10:10 pm :: http://blogs.sun.com/roller/page/theaqua

Joseph,

Thanks for the review and kind words about GlassFish. We will discuss the issues you raised at the User Experience team meeting. We may need your help to re-produce the connection pool problem you are having. Please file a bug in the GlassFish Issue Tracker if the problem is reproducible.

  • https://glassfish.dev.java.net/servlets/ProjectIssues

Thank you.

Nazrul


3. Eduardo Pelegri-Llopart left...
Tuesday, 2 May 2006 12:58 am :: http://blogs.sun.com/theaquarium

Hi Joe! Did you isolate the connection pooling problem well enough to file a bug?

Thanks for the review! - eduard/o


4. Sivakumar Thyagarajan left...
Tuesday, 2 May 2006 4:58 am :: http://blogs.sun.com/sivakumart

Hi Joe

> and certain diagnostics (i.e., “how many JDBC > connections am I using?” and the ability to > examine the JMS queues through the console.) Documentation for JDBC connection pool monitoring is available off https://glassfish.dev.java.net/nonav/javaee5/docs/AG/ablur.html#ablvh and monitoring JMS queues could be done using imqcmd available at ${install-root}/imq/bin. More documentation for that is available off http://docs.sun.com/source/819-2571/monitoring.html#wp998383

Thanks for the feedback. --Siva.


5. Stephen Connolly left...
Tuesday, 2 May 2006 5:59 am :: http://javaadventure.blogspot.com/

"The hang is very frustrating, as it pegs the CPU at 100% usage"

That is because you are running out of PermGen space. It happens when you redeploy an application multiple times. Some of the classes in your application are being loaded and not unloaded when redeploying. If you have enough RAM you can increase the PermGen space in the domain config file and it will give you much more redeployments before hitting the limit. Also, if you are running windows you can create an icon on the desktop which is a shortcut to %windir%\system32\taskkill.exe /f /im appserv.exe Then clicking on that shortcut will kill the server task withing about 5 to 10 seconds even if the processor is at 100%


6. Joseph Ottinger left...
Tuesday, 2 May 2006 9:49 am

Siva, thanks for the link on JDBC monitoring - but pulling up the link fails. The correct link is https://glassfish.dev.java.net/javaee5/docs/AG/ablur.html#ablvh .

I know I can examine the queues via IMQAdmin, but I prefer to use a single console; it's far simpler for "ordinary admins."


7. Sivakumar Thyagarajan left...
Tuesday, 2 May 2006 1:30 pm :: http://blogs.sun.com/sivakumart

I agree that a single console would have helped, and inspite of Sun Java System Message Queue being a separate product/project and integrated into GlassFish for JMS, we have added some JMS related functionality into the asadmin interface for usability reasons as you have pointed out. For example, asadmin {create|delete|flush}-jmsdest for MQ physical destination related operations.

We recommend imqcmd for Destination monitoring and retrieving other statistics for now. OTOH, SJSMQ 4.0 also has public MBeans for these stats, so someone interested could build up their own custom interface and/or use JConsole.


8. Anissa Lam left...
Tuesday, 2 May 2006 7:29 pm

Hi Joseph,

Thanks for the comments regarding Admin Console. Your suggestion is taken seriously. I have opened up an RFE relating to the deployment enhancement that you suggested.

https://glassfish.dev.java.net/issues/show_bug.cgi?id=629

Please feel free to send me comments or update the issue with your thoughts.

thanks

Anissa.