JBoss AS 5 Development
上QQ阅读APP看书,第一时间看更新

Chapter 2. What's New in JBoss AS 5?

Smooth seas do not make skillful sailors—an African saying

Java Enterprise middleware has matured a lot in the last few years. The current release (1.5) of the Enterprise Specification signifies the end of Java's era of Enterprise arrogance—"We are complex because we are powerful"—and the beginning of a new era based on simplicity. This has created new opportunities for some open source products that provide state-of-the-art technology but at a lower cost.

JBoss AS is the leader of the open source application servers and, according to a recent survey, the most used application server by the community of developers. What is the reason for this success? First of all, JBoss AS makes it easy for developers to leverage Enterprise features without undue complexity by focusing on "transparent middleware". This means providing services such as JBoss Clustering , which requires no changes or design-time modifications to the code in order to benefit from.

The second important reason is that JBoss AS is widely recognized for supporting the latest standards. Actually, it is the first open source application server to achieve J2EE 1.4 certification with JBoss AS version 4.0. This demonstrates the strength and speed of its Professional Open Source development model.

Increasingly, JBoss is not only setting the pace in implementing standards, but is also becoming a leader in setting industry standards. JBoss was recently elected to the executive committee of the Java Community Process (JCP). In the latest years, JBoss has been driving the development of Java Enterprise including voting on all Java Specification Requests (JSRs). Indeed, JBoss sits on the expert group for Enterprise Java Beans (EJB) version 3.0 and was one of the first application servers to release a compliant EJB 3.0 release.

The current stable release of JBoss is 5.1.0 (at the time of writing), but we will refer to 5.0.0, which was released on December 5, 2008, after a three year long marathon. The new application server was long awaited by the community of developers and, as with all major refactorings, its release took a bit longer than expected. However, the effort needed to release the new version was justified by the number of innovations. Changing the internal architecture and replacing the guts of the application server, while maintaining backward compatibility with the majority of the existing services, was a cumbersome task.

The application server kernel has been rewritten completely based on the JBoss Microcontainer project. JBoss Microcontainer is a refactoring of the earlier JBoss Java Management Extension (JMX) kernel and delivers something that the competitors tried to produce for a long time—a completely modular and scalable POJO-based foundation. Support for JMX in JBoss AS 5 remains strong, and MBean services written against the old Microkernel are expected to work.

The Microcontainer integrates with JBoss AOP—a programming paradigm that increases modularity by allowing the separation of concerns. In fact, JBoss AS 5 is one of the first application servers that intensively uses AOP. The new deployment layer of the application server is heavily influenced by AOP too.

As a matter of fact, JBoss AS 5 is designed around the advanced concept of a Virtual Deployment Framework (VDF), which applies aspect-oriented design to the deployment layer.

Aspect-oriented deployers operate in a chain over a virtual file system (VFS), analyze deployments, and produce metadata to be used by the JBoss Microcontainer, which in turn instantiates and wires together the various pieces of a deployment, controlling their life cycle and dependencies. This helps you to have have full control over the deployment cycle of your application. For example, you can customize the structure of your application so that a non-standard Java EE application can be deployed on JBoss. We'll see this later.