State of Open Source Java EE Application Servers

This is a very basic review of active and available open source Java EE Application servers and Servlet container (Web containers) to let the community know which active containers are available and what is the general status of each container. The article can simply act as a start point for anyone need to select one of them for later use in development or product. Detailed comparison of these production cover many pages of a tick book.

Full blown Open Source Java EE Application Servers:

Resin, a well known product from Caucho is an open source Java EE application server which has been around for quite a long time and many small and large deployment of it are serving small and large systems like DZone itself.

Current stable version of Resin is 3.1.9 which fully support Java EE 5 and the development version which will replace the current one is 4.0.1. Resin licensing Schema is a bit different with other alternatives. They provide a GPL-ed version for open source distributer and evaluators while commercial usage requires paying Caucho some per/CPU – per/year fees. Different editions of Resin is available with a different set of features and capabilities and each edition has its own pricing schema. You can find more about the different versions and licensing fees at: Licensing

Resin come with Clustering, high availability support and benefits from an integrated caching system. Similar to GlassFish Resin support hosting PHP applications using Quercus.

For the administration and management, Resin took an alternate path by providing a light weight monitoring application to let administrators and developers see status of different services in the application server and left the the administrators to perform administrative and configuration tasks trough configuration files.

When it come to development tools support you can expect NetBeans, Eclipse and IntelliJ integration along with integration with Ant, Maven, and Ivy.

  • Download link: http://www.caucho.com/download/ You can get version 4.0.1
  • How to start: goto install_dir/bin and issue /resin.sh start or resin.bat start dependin on your OS
  • Monitoring Console: details: URL: http://127.0.0.1:8080/resin-admin/ You will need to create a user and password to proceed further. Follow the on-screen steps to create the user and password.

Geronimo: The Apache Java EE application server which is obviously distributed under ASF. Geronimo lacks behind GlassFish when it come to implementing new Java EE specification but it benefits from a good administration console compared to JBoss. Clustering is available trough 3rd party products like Terracotta and there is no out of the box support for clustering and high availability. Geronimo is well integrated with other apache projects like ServiceMix and ActiveMA. Current version of Geronimo is v2.1.4 and fully support Java EE 5 specification. Commercial support for Geronimo is available through IBM WebSphere Application Server Community Edition.

Two separate distribution of Geronimo is available, one with Jetty as web container and the other one with Tomcat as the web container. All Major IDEs support Geronimo as a development server.

GlassFish: Mainly developed by sun Microsystems and benefits from a modular, and extend-able architecture. GlassFish is in the front line of providing the community with new Java EE specification implementation and in the same time it provides all users with features like: advanced administration channels, out of the box clustering and high availability, OSGI runtime deployment and so on. Using Glassfish means that users can easily sign a contract and get support from Sun without need to change the deployment bits. current GlassFish stable version is GlassFish 2.1.1 and the next major version is GlassFish v3 which is a fully Java EE 6 compliant and OSGI based application server. The new version is due to be released on November this year. Open source GlassFish is accessible under CDDL and GPL licenses.

GlassFish benefits from integration with a wide set of Sun products starting from operating system (Solaris) up to the IDE (NetBeans). GlassFish ESB, Open Portal, OpenSSO and OpenMQ are some of the notable projects that GlassFish is well integrated with.

Another strength in GlassFish is integration with Sun HADB which can form a proven highly available infrastructure without spending any penny for the required software and licenses.

All Major IDEs support GlassFish as a development server and it means an easy start for developing Java EE applications using GlassFish.

JBoss: It was present in the open source community longer than other projects and benefits from Red hat support. JBoss Application server provides Clustering and high availability out of the box but the administration console which included in the distribution from version 5.1 is not advanced enough to let administrators manage the all application server resources . The included administration and management console is an embedded version of Jopr (http://www.jboss.org/jopr). This console will acts as a single point of administration and management for all JBoss technologies like ESB, cache et. Current version of JBoss is 5.1.0.GA and next upcoming version is 5.2. JBoss is distributed under LGPL and anyone interested can get commercial support from Red Hat. JBoss community distribution and enterprise distribution are two different package and and moving from community support to commercial support means installing an alternate version of Jboss named JBoss Enterprise Middleware.

JBoss application server benefits from integration with a wide range of middleware provided by JBoss. This products include caching, BPM, ESB, portal and so on. On the development side, it benefits from JBoss Developer Studio (not available for free) which is based on Eclipse and provide tooling for wide range of middlewares provided by Jboss.

All Major IDEs support JBoss as a
development server and it means an easy start for developing applications on top of this application server

JOnAS is one the flagship projects in OW2 consortium and in contrast with having less buzz in the news and blogosphere it benefits from a profound modular architecture based on OSGI. JOnAS administration console is well designed and benefits from a slick user interface. Jonas benefits form integration with JASMINe for designing, deploying and administrating a clustered environment.

Current version of Jonas is 5.1 which fully support Java EE 5, the next planned version is 5.2 which is due to be released in Feb 2010 with basic support of Java EE and self management. Major IDEs like Eclipse and NetBeans support JOnAS as a development server. Jonas is distributed under LGPL

Servlet Containers:

Jetty: Jetty is considered an alternative to Tomcat to some level. Because of the differences between these containers architecture each of them has its user base. Jetty is considered lighter, easier to embed and highly modular while Tomcat is considered more feature rich. Both projects benefit from a good performance under heavy load but it certainly can change from version to version and between different use cases. A cluster of jetty instances can be configured using any of Gigaspaces, WADI, Terracotta, etc. Jetty does not have a management console and everything should go through the configuration files by adding required changes to the configuration files. A good comparison between Tomcat and Jetty can be found at: http://www.webtide.com/choose/jetty.jsp

  • Download link: http://www.eclipse.org/jetty/downloads.php
  • How to start: goto install_dir/bin and issue ./jetty.sh start or jetty.bat start depending on the OS
  • Administration console details: No administration console.

Note: before attempting to start Jetty add following line in the install_dir/bin/jetty.sh or jetty.bat depending on the OS.

For Windows:

set JETTY_HOME=path/to/jetty/install/dir

For Linux, UNIX..:

export JETTY_HOME=path/to/jetty/install/dir

Note: before starting tomcat add following line in the install_dir/conf/tomcat-users.xml inside the tomcat-users node:

<user username="tomcat" password="tomcat" roles="manager"/>

Conclusion: None of this projects can fit all development and deployment plans and requirement. Each of them has its strenghts and weak points compared to other 5 competitive projects. What one need to do is testing all of them and decide which one is better.

WSJ says: “IBM in Talks to Buy Sun”. But Why would IBM buy Sun Microsystems?

The Wall Street Journal Published an article which discuss possibility of IBM buying Sun Microsystems, but why on earth should IBM take over Sun Microsystems when every product which Sun offer has a counterpart in IBM arsenal.

In software range Sun offers Operating System, Database, Application server family of products, identity management family of product, Integration series of products either developed by Sun or acquired from other companies, Software development tools including NetBeans and its related add-ons. All of these products has a counterpart in IBM series of products.

In hardware range Sun offers Storages, X86 and Sparc servers, and networking solutions. All of these products have their counterpart in IBM arsenal and having them add no exceptional value to IBM set of available products which make IBM take over Sun Microsystems.

But Why would IBM think about buying Sun Microsystems and what Sun own that IBM does not?

  • First Sun owns Java and all rights over its patents and source codes
  • Sun owns some products which I am not aware of any counterpart in IBM offering, these products includes: VirtualBox and X86 virtualization, and Sun xVM Ops for data centre management
  • It is told that IBM has the largest patents arsenal but Sun owns enough patents which IBM might be interested to own them
  • Although IBM has AIX and there are some undergo efforts to port Solaris to Z architecture but maybe IBM has some more plans with Solaris

A list of Sun software with their counterpart in IBM arsenal:

Sun Product

IBM counterpart

Sun JDK*

IBM JDK, although I think IBM licensed Some part of Sun JDK to avoid developing them again (class path?)

NetBeans and Sun Studio series of products (For Java, C++ and so on)*

Eclipse and Rational line of products(For Java, C++ and so on)

Sun middle-ware product line including but not limited to: GlassFish, Portal, Sun Identity management, JCAPS and OpenESB, and so on.*

IBM Websphere product line including but not limited to: Application server, Portal, Tivoli Identity management, ESB, and so on.

Sun Solaris*

IBM AIX, Z/OS, Z/VM and whatever Z starting word that you can write here

MySQL as a product which Sun owns, Java DB and PostGreSQL support*

DB2, DB2 express edition, DB2 community edition, Informix dynamic server(is it still alive?)

JavaFX

Nothing that I am aware of

X86 virtualization*

Nothing that I am aware of

Data Centre management(Sun xVM Ops center)

Nothing that I am aware of

*All of these products except JCAPS and Sun xVM Ops are open source. And all of them are high quality with a well established community of user and third party companies which are involved in their development.

Now, Why could be possible reason that we hear "IBM in Talks to Buy Sun"? The reason can be:

  • Patents and rights that Sun is holding over Java, Sparc and Solaris
  • The Open Source model which Sun introduced and looks to be successful
  • Open Source products that Sun is developing and have gained enough attraction from the community which result in "IBM in Talks to Buy Sun" once more.
  • Brilliant architects, engineers, and evangelists which are working for Sun Microsytems
  • Some software and functionalities which IBM does not own
  • Customers and community to gain more market share, specially in middle range market
  • Maybe IBM is interested in un-released Sun Cloud Computing… Sun is known to either does not enter an area or if entered provides a very good product or service in that area, technically speaking.

What can happen if IBM take over Sun Microsytems? The answer is: no one knows expect those IBM super managers which are possibly thinking about this take over. But some predictions:

  • Java will evolve much faster as IBM has more man power to assign to it
  • OpenSolaris will get more attention and possibly replace AIX in long term
  • MySQL and Sun middle-ware products will form a big bundle of highly integrated, high quality Open Source products and bring more revenue to IBM
  • IBM will lay off some Sun employees, specially in sales and marketing section because they have many sales and marketing employees
  • NetBeans and Eclipse? I can not comment with more than 20 percent of certainty, but I think either IBM kill all middle-ware or work on NetBeans development for as long as they provide all NetBeans functionalities that support Sun middle-ware development in Eclipse
  • JavaFX will see a boost in development as IBM can afford more man power
  • Swing and SWT story? I think IBM will keep Swing as a part of JRE but hey will push SWT as a part of the JRE to ensure it will get enough chance of growing in the market
  • Responsibilities for providing support for Java, JCP, TCK and… will be given to a foundation organized by IBM, Oracle, RedHat, …

I may have missed some items due to short term forgetfulness or being completely unaware of their presence. If you happen to know them, let me know and I will include it in this blog.

 

Some thoughts on the JBoss AS 5 release

JBoss application server 5 GA released after a very long period of silence from "JBoss, a division of Red Hat". The new version of JBoss application server supports Java EE 5 and is based on modularity concept with a small kernel named JBoss MicroContainer in the core and all functionalities as modules around the kernel. JBoss kernel is POJO based and all modules follows the same principals, some configuration files are required to configure the services which the kernel will load. JBoss modularity system is niether based on OSGI nor drafts of the to be released Java SE modularity system.

JBoss 5, uses the MicroContainer to ensure an easy implementation of Java EE 6 profiles and also let the developers and administrators to easily disable some features and enable some other features.

I think from version 5, JBoss application server development will see some dramatic changes, the modules will be developed independently and therefore, the release cycle will be a mixed model of hot module releases like updates and patches and major releases which is an integration of all available modules. Although JBoss is far from providing a solid foundation in term providing a package distribution system and all required software to keep an eye on the updated modules and installing them, but that is the path which I think they will follow.

With all this architectural changes, JBoss 5 has a drawback. There is no changes in the administration at all, 3 years of development produces no changes in what administrators use to manage the servers, clusters and applications which are assets of the company which they work for. The same old JMX based administration console is what administrators should deal with for some few months or years until Red Hat finishes the development of their new administration console. Yes, the have a project named Jopr to provide a neat SEAM based administration console, but when it will be ready to get bundled with AS, no one knows.

Today GlassFish is the dominant open source application server and it gained the market share in absence of the Open Source application servers steward, JBoss. The steward re-appeared but its re-appearance is not that promising because of many advantages which its replacement, GlassFish, provides over it.

GlassFish v3 uses a modular architecture based on the standards.The OSGI as the bundle layer and HK2 which is an early implementation of JSR-277, Java SE modularity system, for the service layer. There is no need to edit an XML file, just drop the bundle and it is installed or remove the bundle and it will not load the next time. Also you can utilize the very easy to use update Centre which in addition to managing the currently installed modules, let you install updates or brand new features by selecting the features that you need and waiting for the download to finishes.

GlassFish v3 distribution is based on a solid binary distribution system named pkg(5) Image Packaging System or simply IPS which is a operating system independent software distribution system based on network repository of the software packages. The IPS helps keeping GlassFish up to date automatically with in the blink of an eye. it let you install the new features and updates by some clicks in the desktop GUI, web based administration console, or using the command line

GlassFish v3 provides very solid administration channels including the JMX console, the web based administration console and the command line administration tools which one can use to administrate all aspects of the application server from mere deploying an application to large scale management of a cluster farm.

And Finally GlassFish version 3 supports Java EE 6 and its final version will be available by the middle of 2009. if you want to know about GlassFish for Java EE 5, you should know that the version which supports Java EE 5 released in May 2006 and its 3rd major updates is GlassFish 2.1 which is scheduled to be released on Jan 2009

 

Four open source Java application servers compared

I was looking at feeds that my email client fetched during the day and I find am interesting one which lead me to an article written by Jonathan Campbell. Article can be found at http://www.javaworld.com/javaworld/jw-12-2007/jw-12-appservers.html

Jonathan compared 3 different application server/ servlet container by thier support of Java EE 5 and some other factors. article explained about each feature that he compared application servers based on it. Jonathan did not included GlassFish in his review of "open source Java application servers" and only included 3 application servers/ Servlet containers including Tomcat, Jboss and Geronimo. :-), So I thought I should include some facts here in order to make the comparison fair to all parties.

Including Glassfish into Jonathan matrix will give us the following table: *Notice*

Feature

JBoss 4.2

Geronimo 2

Tomcat 6

GlassFish 2

Java EE 5 compliance

Partial

Yes

No

Yes

EJB 3.0 capable

Yes

Yes

Available

Yes

JSP 2.1 and 2.5 capable

Yes

Yes

Yes

Yes

JavaServer Faces 1.2 support

Yes

Yes

Available

Yes

Custom plug-in support

Yes

Yes

No

?

Business-rules engine support

Available

Available

Available

Available

Hibernate 3.x support

Yes

Available

Available

Yes, based on below description

JBoss Seam support

Yes

Yes

Available

Yes

Clustering support

Yes

Yes

Partial

Yes

Eclipse IDE connector support

Yes

Yes

Yes

Yes

 

Following descriptions further explain some of what Glassfish can provides in relation of the above table

  • GlassFish fully support Java EE 5 with all its related JSRs like JSP 2.1 (JSR 245), Servlet 2.5(154), EJB 3.0(JSR 245), etc.
  • GlassFish support clustering and cluster management out of the box, a cluster can be configured from both CLI and Administration console.
  • GlassFish administration console allows you to configure your load balancer :-), for example you can configure a Sun Java Web Server which works as load balancer to add or add/ remove an instance from its list of servers, either manually or automatically if a new node joined the cluster or removed from the cluster
  • GlassFish allows you to manage resources for entire cluster at once instead of applying them for each instance, for example you can deploy a web application into a cluster of 10 instances instead of deploying it seperately for each instance.
  • GlassFish has a very wide array documentation both from Sun Microsystems (for free) and from GlassFish community.
  • GlassFish installation is as easy as executing 2 commands.
  • Deploying applications into GlassFish or even an entire cluster of glassfish instances is just 2 clicks away.
  • Quality of GlassFish components is out of any question, Metro is well known for supporting new WS-* standards, EJB support uses Toplink Essentials, MQ server is Sun open sourced MQ, etc.
  • GlassFish has very good interoperability with some other open source projects like, OpenESB and OpenSSO which allows you to have what you need to kick start your J2EE application without looking at any additional configuration.
  • Certainly performance is something which everyone should have in mind before considering other feaures, take a look at http://www.spec.org/jAppServer2004/results/res2007q3/jAppServer2004-20070703-00073.html and http://weblogs.java.net/blog/sdo/archive/2007/07/sjsas_91_glassf.html to find out more about how much capable GlassFish is.
  • GlassFish has connectors for both Eclipse and Netbeans, although other mentioned servers have a connector in Netbeans and Eclipse.
  • Seam support is available from GlassFish 1 upward.
  • Business rule engine support is available from OpenESB project integration.
  • About hibernate support, I cannot understand whether Jonathan means to use Hibernate as a persistence provider or plainly as an ORM, by the way both of this ?features? are available for GlassFish users.
  • GlassFish has an Update center, which allows you to update your application server from a remote repository.
  • GlassFish runs on all mentioned platforms, from Windows to AIX (Glasdfish 2 update 1 runs on AIX) and there is no restriction for you to run it on your platform of choice.

Mentioned items are in relation to what orginal article tried to compare. GlassFish can be used by a ROR developer by its integration with first class ROR IDE (Netbeans 6), It can serve you VOIP and SIP requirement by means of sailfin,etc. Any user with any kind of requirement will find GlassFish a suitable application server.

Although Jonathan did not mentioned GlassFish directly, but he gives his opinion by writing:In my experience commercial application servers have more bugs than the open source servers compared in this article, and they are more difficult to install. Deployment can also be an issue — at least with the recent version of Sun’s Java Application Server. The article co
uld be more complete if Jonathan included GlassFish in his comparsion chart and at then end he could write that GlassFish has problematic deployment procedure

 

An statement which looks odd to me is: In my experience commercial application servers have more bugs than the open source servers compared in this article, and they are more difficult to install., Althogh it will be a complex procedure to setup a Cluser of Websphere (as a commercial application servers ) using websphere XD, Object Grid, and other available packages that faciliate enterprise scale deployment of Websphere, but WebSphere has a decent performance and reliability which is very hard to deny.

Notice: Some parts of this table taken from Jonathan Campbell article published by javaworld and is available at http://www.javaworld.com/javaworld/jw-12-2007/jw-12-appservers.html

Netbeans 5.5 and Jdeveloper 10.1.3.1 both sounds very good…

Netbeans 5.5 and Jdeveloper 10.1.3.1 which one ?
Both Jdeveloper and Netbeans that i am talking about them are in beta and developer preview stage.
Netbeans as an Opensource IDE has its own fast growing user community.

Netbeans 5.5 beta 2 let features include :

  • develop and deploy on tomcat / Glassfish and Jboss out of the box.
  • As core features it has many code generation facilitis which can help to bootstrap an application ,it has code generation for CMPs , session facades ,ws client stub….
  • Having an almost first class profiler , first class J2me development pack
  • New c/c++ development pack
  • good support for SVN and CVS
  • very good Swing designer
  • developer collaboration module
  • Heavy support of SUN by giving the source codes for some of its extra pack

which Made NetBeans a good choice for developers.

One of the packs that donated by sun· is Enterprise pack , Enterprise pack features in brief are as follow :

  • UML 2 compliant modeler
  • visual BPEL
  • visual WSDL designer
  • xml visual tools for xml schema declaration …
  • facilities to develop web service and apply security on them.

Sun announced that it will add Java Studio creator to NetBeans Stack as another package.
having Creator can attract many users to Netbeans as it provide a rich set of feature for web application developers.

but what about Oracle JDeveloper 10.1.3.1?
some times ago Oracle announced that it will let developers to use JBeveloper for free . so Jdeveloper and Netbeans from one point of view are the same ,You will not pay any penny for them.
Oracle really boosts JDeveloper in recent years which made JDeveloper a choice for j2ee application developers
JDeveloper Editor has changed to a very powerful editor with a good refactoring support.
opposite to Netbeans which you need to download several package to gain most of its feature you will not need to download any extra package to make use of jdeveloper as it is appropriated.
·

  • Oracle have much more code generation falsities that Netbeans .
  • visual ESB modeling allows you to assemble you ESB component visually (its ESB is not JBI compliant)
  • visual WSDL designer
  • visual xml development tools
  • good swing designer and data binding using oracle ADF
  • good JSF / Struts support , indeed Jdeveloper JSF support with its ADF faces is brilliant.
  • WYSIWYG for HTML and jsp pages with support of third party jsf libraries like Myfaces.
  • first class database development facilities ( for oracle database mostly).
  • Only you can use oracle server suite as development server there is no support for other application servers.
  • No support for c/c++ development (AFAIK).
  • built-in profiler
  • very powerful web page generation which can bootstrap a data driven web page design.
  • UML modeler (1.4 compliant)
  • very rich set of facilities for Web service development

I think JDeveloper (for now) is ahead of NetBeans as it provide much more facilities for developers , but for later version we can not tell anything because NetBeans people are unpredictable , as they prove their credibility by release of NetBeans 5.

What you have read is my opinion which might be biased. we never can say that one IDE is 100% better than another , it is just context oriented and the users view point. but one thing is completely obvious that JDeveloper and NetBeans both are going to provide rich facilities for SOA. NetBeans by means of· Enterprise pack and using glassfish with integrated BPMS from intalio and· what it has acquired from seebyond.
and oracle with its SOA suite and JDeveloper , both are going to make choice harder for developers.

overview of XML Parsing in java , different methods and libraries

what are different technologies and implementations to simply pars some XML files ?
What Java provide you to pars XML files ?
Iin this blog entry After answering the above questions , i will introduce (by name and method of parsing) some XML parser available in java land.we may talk more about each of them in next entries.
First lets see what are different methods to pars XML files. There are Two major XML parsing method , one of them is Old and Standard method using a DOM (Documet Object Model) and the other is Stream and Event Based Parsing.

  • In DOM metod we fetch entiere XML document into memory and create a Objective representation of it in the memory then we can traverse the document using a very rich set of methods which DOM interfaces defined. So wen can access the document tree in any time and change its elements or attributes on emand.
    But it will need a high amount of memory to store the Document Tree , so it is not suitable when you have resource (memory) limitation. as you know Current Browsers use this model, so we can easily use javaScript to access an elements and Change them in runtime base on our needs.Using DOM you can create and write XML files.

  • Other model Use Streaming and is event based, what does it means ? it means that it go trough the document from start to end , and as soon as it(the Streaming parser) sees some text nodes , attribute , Maleformed elements… it will trigger an Event which you are listening for , so it is a one way parsing which in , you can not change the elements or its attributes as you can do in DOM .In Streaming model you do not need a high amount of memory becasue you are not going to create a model of your document in memory.using Stream parsers you can create an XML file.

but we should notice that we have Another categorizing for XML parser refer to parser and client communication mechanism , there are two kind of communication mechanism between parsers and client that use those parsers , by this categorizing we have two kind of parses :

  • Push parser
  • Pull parser

Parsers that we have had before StAX are push parsers, which parser push XML data to client whether it needs those data or not or even it is ready to recieve data or not.
Pull Parsers which come along with StaX parsers provide another mechanism for letting Client to have the data . it give the ability of asking for XML data to client , so Client will recive Data when it asks for those Data.
Now you should know that DOM / SAX are both push parsers , and the only pull parser implementation that i used is StAX.
some features that make StAX a suitable parsing method when you need just to pars xml files while there is no need to create or update an XML file, you should know that StAX is one was parser as SAX parsers are.

  • With StAX you can write XML documents too , meanwhile with SAX you can not write XML documents.
  • using StAX as i will show you in next part is much easier than using SAX
  • In pull parsing your own code has the control of Parser client Thread becasue its you that engage with Parser MeanWhile in a push parser it is parse that is mainStream in your code becase it parse and give the parsed data back to you whether you ask for it or not
  • You can works with several XML Streams (parsing and processing them ) in pull parsing mode when your client code is one thread, meanwhile you can not do this in a push parsing mode

Now Lets see what XML parsers support which models:

Model / XML Parsing Library

Crimson
1.1.3

Xerces
1.4.4

JAXP
1.3

NekoPull1
0.2.4
   

Piccolo
1.04

StAX
1.2 RC

dom4j
1.6.1

Push Parsing

Yes

Yes

Yes

No

Yes

No

Yes

Pull Parsing

No

No

No

Yes

No

Yes

No

Stream Parsing  implementation (SAX)

Yes

Yes

Yes

Yes

Yes

Yes

Yes

DOM Parsing implementation

Yes

Yes

Yes

No

No

No

Yes

 

1- It Extends  XNI to provide pull parsing.