Some of you may know that I really enjoy working with Sun Application Server 9.1, the commercial version of Glassfish. The commercial version is still free to use, and is the only version you can get paid support for. I spoke with some of the Glassfish team at JavaOne, and also saw some presentations on upcoming features.
First I'd like to get everyone's burning question out of the way: Why should I even consider switching app server products? I asked a Glassfish representative at JavaOne this question. She told me that Sun entered the application server market late, after everyone was already using BEA WebLogic, WebSphere, JBoss, etc... Companies have made large investments purchasing commercial application servers and will not switch to Glassfish just because it's there. Developers who do look at Glassfish today will find that it meets all of their functional, availability, scalability, and performance requirements. These developers may choose to use it for new products. I thought these were very good points. The point of this blog entry is to convince developers to give Glassfish a try.
Our company was using JBoss because it is free. The reason I switched to Glassfish was because of its full featured web based admin console. I did not enjoy editing many XML files to configure JBoss. I used to have to search Google to figure out which XML file I need to modify or create, and which syntax to use. With Glassfish's web based admin console, everything you could possibly configure is accessible through a treeview and tabs. Initially I spent a lot of time exploring and discovering features I didn't know existed. For example, the web services monitoring screen. After I enabled monitoring for a specific web service, I was able to view live usage statistics and the raw SOAP messages. This was very useful when debugging. There are also command line tools that you can use to configure anything and everything from your scripts.
Another great feature in Glassfish is the Grizzly framework. Grizzly is a high performance, highly scalable TCP/UDP/SSL framework built on Java NIO sockets. I've seen charts where it outperforms Apache MINA (Multipurpose Infrastructure for Network Applications) framework, and C based servers. Grizzly also has an implentation of the Comet Bayeux protocol for server push to AJAX applications. It is necessary to implement Bayeux at this layer to have thousands of outstanding responses without consuming a thread for each.
The Glassfish team worked directly with Microsoft to enable interoperability between the Java platform and Windows Communication Foundation (WCF). Beyond basic SOAP messages, it was previously not possibly for Java and .NET web services to interoperate with security, reliability, trust, and other advanced features. The Glassfish team created an implementation called Web Services Interoperability Technologies (WSIT) and have built it into the Glassfish 2 (currently in beta). It is built on top of JAX-WS and JAXB. Not a single API has changed, so your existing web service endpoints and clients don't change. You simply add a configuration file to your project to enable these features. There is a NetBeans plugin that makes configuration extremely simple.
New in Glassfish 2 (currently in beta) is support for clustering, virtual servers, load balancing and high availability. A Glassfish representative showed me a demo of how to easily configure a cluster using the web based admin console. Your application doesn't need to change, and your HTTP sessions are automatically replicated to all nodes. Your load balancer can send a user's first request to node #1, a second request to node #8, and the user will never know. You can use a plugin for Apache httpd for load balancing, or use Sun's Web Server product. If you have a hardware load balancer, you can use that instead.
OpenPortal adds JSR-168 portlet support to Glassfish. One of the developers showed me a very impressive demo at JavaOne. He showed me how users can drag/drop portlets around and have it save the new layout using AJAX. The default theme looks sharp, and there are a number of great features such as Web Services for Remote Portlets, inter portlet communication, JSF portlet integration, "communities", NetBeans and Eclipse plugins, etc... Presently they are working on support for the new JSR-286 portlet standard. I think OpenPortal can be deployed to any application server.
Ericsson announced at JavaOne that they are donating their SIP (Session Initiation Protocol) and SIP Servlets technologies to the Glassfish project. This technology is behind many popular services we enjoy today, like Voice-over-IP (VoIP) phone service, instant messaging, presence and buddy list management and web conferencing. SIP Servlets are going to play an even bigger part in building the next generation of Telecommunications services. They will be working towards achieving JSR-289 compatibility, adding high availability and clustering features and integrating with the existing GlassFish services. The Ericsson promo video at JavaOne showed all kinds of neat things you can do with the technology to integrate your TV, cell phones, computers, and those services from your provider. They showed a boy wanting to watch a movie, the request being sent to Mom's cell phone for approval, Mom accepting the request and the movie starting. They showed text messages appearing on your TV, and all kinds of other neat things. Everyone at JavaOne was very impressed.
Something else I love about Glassfish is that they are comitted to staying on the forefront of Java EE technologies. You don't have to wait 1-3 years for them to implement the latest version of Java EE. Glassfish also has RESTful web services support, and SOA support (JBI and BPEL). There is an active user community who communicates through mailing lists. Glassfish developers have been quick to answer my questions, and quick to resolve bugs other people have found. There are Glassfish plugins for both NetBeans and Eclipse.
If that isn't enough to convince you to try Glassfish on your next project, then let me tell you about version 3! At JavaOne they showed a demo of the application server starting in something like 100ms! In version 3, only the pieces that are needed by the deployed applications are loaded. As you deploy and undeploy applications, different modules within Glassfish are dynamically loaded and unloaded. In the demo they deployed a WAR file and showed dynamic bits loading in about one second. Next they restarted the application server in just over one second! Also in version 3, there will be a way to configure which containers are available. Presently supported are Java web applications, Ruby on Rails using JRuby, Phobos using the phobos runtime, and PHP using the resin quercus engine.
With Java EE applications at IJWS, we use the commercial version of Glassfish (Sun Application Server 9.x) by default so that our clients can use it for free or buy support if they want. Soon we will offer BEA WebLogic as an alternative so that we can be flexible for those clients who are already comitted to BEA.
Working from his home office in Toronto,
Ryan de Laplante can be found developing software in
Java by day, and obsessing with technology by night.
Ryan has been designing and writing software for
IJW since 1998 and is very passionate about his work.





