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

Application server features

We'll divide our journey into the new features of JBoss in a few steps. First, we'll inspect the core modules, which are the foundation of the application server. Then we shall analyze the directory structure of the application server. At this point we will have enough elements to draw some conclusions.

The core modules of JBoss AS 5

JBoss AS 5 is a combination of stable technologies. Some of these have been adopted by earlier 4.x releases such as the EJB 3.0 technology, others are a substitute like the new messaging system that replaces the older JBoss MQ.

JBoss AS 5 puts in your hands the lastest generation of Java Enterprise frameworks without the need to install additional libraries. In the next chapters, you'll learn how this can greatly improve things from a productivity standpoint—developing Java Enterprise applications has never been easier!

Cutting edge EJB container

JBoss AS was one of the first application servers to adopt EJB 3.0 specifications. The EJB 3.0 model simplifies development by removing the requirements for home interfaces, deployment descriptors, and callback methods, and by adopting regular Java classes and business interfaces as EJBs.

JBoss EJB 3.0 framework uses, behind the scenes, Hibernate 3.x. as persistence engine. Hibernate's Entity Manager implements the programming interfaces and life cycle rules as defined by the EJB 3.0 persistence specification. You may use a combination of EJB 3 interfaces or even pure native Hibernate, depending on the business and technical needs of your project. You can, at all times, fall back even to native JDBC while adopting the EJB 3 paradigm.

Note

In the third quarter of 2009, an EJB 3.1-compliant release of the JBoss EJB stack is planned, which will add many new features such as asynchronous session beans, optional session bean interfaces, singleton EJBs, and much more. For more details, check out the EJB 3 project home page at: http://www.jboss.org/ejb3.

The new messaging provider

JBoss Messaging is the new high-performance JMS provider included with JBoss AS 5 as the default messaging provider. It replaces the old JBossMQ, which was shipped with JBoss AS 4.x series. JBM supports clustered queues and topics out of the box, along with transparent fail-over and intelligent message redistribution. Messages can be replicated in memory across nodes avoiding disk I/O, or be persisted to any popular relational database using paging techniques with support for very large messages. You will hardly find any other Java open source messaging implementation that can beat that level of functionality and performance.

Rock solid transaction manager

JBoss AS 5 ships with JBossTS (the transaction manager purchased from Arjuna). This transaction engine is rock solid with more than 20 years of expertise in transaction management. It was the first JTA (Java Transaction API) and the first JTS (Java Transaction Service) transaction management implementation on the market, and its implementation fully supports recovery and logging. So, it's an amazing expertise there.

Enhanced web container

JBoss Web is the web container in JBoss AS 5, which is based on the Apache Tomcat 6.0 project and includes the Apache Portable Runtime (APR) and Tomcat native technologies to achieve scalability and performance characteristics that match and exceed the Apache HTTP server. The "web" configuration is now also one out of the box server configurations that ships with the application server. It aims at providing a lightweight JBoss HTTP Container, along with additional features such as Java Persistence API (JPA), and JTA or J2EE Connector Architecture (JCA).

JBoss Web Services 3.0

JBoss AS comes with JBossWS 3.0, which fully supports JAX-WS/JAX-RPC standards, attachments with XOP and SwA. JBossWS has been designed as a pluggable architecture, which allows the replacement of the underlying Web Services stack that had several compatibility issues, so you can swap JBossWS Native with Sun Metro or Apache CXF. Thus, you should be able to use the web services stack best suited to the problem at hand.

Improved clustering support

One big improvement in the clustering area is the use of the new Hibernate/JBoss Cache integration for second-level caching that was introduced in Hibernate 3.3. Used along with JBoss AS 5's new CacheManager service, this combination provides a flexible framework that allows use of separate caches for entities (invalidation cache) and queries (replication cache).

The application server structure

The structure of the application server has changed quite a lot from the 4.x release. Let's first have a look at the new server directory tree and the corresponding JBoss system properties:

The application server structure

Impressed by all stuff we've got here? If you are not familiar with the JBoss Application Server, you might feel a bit disoriented. However, the following tables will be your initial reference to the application server. The first table scratches the surface of the root directory structure, giving a short description of the content of the individual folders:

Drilling down further into each server configuration, we see yet another common hierarchy below. The directory server contains all the code and configuration information regarding the services provided by the particular configuration. The following table resumes the content and description of the directory: