Novell is now a part of Micro Focus

A Cool Solutions for Developers Book Review: JBoss 4.0, The Official Guide

Novell Cool Solutions: Feature
By Simon Nattrass

Digg This - Slashdot This

Posted: 29 Aug 2005

Review by
Simon Nattrass
Software Engineer
Novell, Inc.

JBoss 4.0, The Official Guide (Sams Publishing, ISBN: 0-672-32648-5)

In a previous article I offered some commentary on JBoss basics for SUSE Linux Enterprise Server 9 with "An Introduction to JBoss". While the article covered a lot of ground, JBoss is a topic on such magnificent scale than no single article could do it justice. Luckily the hard work has already been done with JBoss 4.0 – The Official Guide from Sams Publishing. Here I examine the book and look at the highlights the reader will encounter.

Chapter one introduces JBoss to the uninitiated bringing the reader up to speed with the varying methods of installing the application server, either via the binary download or building the entire application from source code. Installing from binary the reader is guided through the process of obtaining the official packages and the required prerequisites. A detailed analysis of the standard JBoss directory structure follows, granularly examining all the important files after which the reader is then show the steps required to test this new installation. The second route - source code installation is subsequently explored, covering essential CVS concepts, finally building JBoss from code grabbed from the version control repository.

With JBoss built and installed the next topic on our journey is the role of JMX - the Java Management Extensions API as the component bus to glue the disparate J2EE components. Chapter two outlines the heart of JBoss - the "JMX Microkernel" which provides the framework for these components (MBeans) to plugin into. These beans are the functionality of the application server and are installed into the microkernel via a standard Deployer Architecture. The chapter rounds off with an examination of exposing these MBeans via the Simple Network Management Protocol (SNMP) for monitoring and a seminal look at exposing MBean interfaces to remote clients via arbitrary protocols.

One of the core J2EE services is the Naming Service which is implemented with JBossNS. Although the book assumes a reasonable level of J2EE throughout, chapter three takes time to introduce the underlying technology – JNDI and it's role within the J2EE environment through many concrete examples. This leads nicely into JBoss's ability to handle transaction management in chapter four. Again starting from the ground up, the reader is given textbook coverage of ACID properties (Atomicity, Consistency, Isolation and Durability), locking paradigms and distributed transactions, all before a look at how JBoss handles transactions under the hood.

No examination of a J2EE server would complete without some discussion of it's approach to Enterprise Java Beans (EJB) and chapter five gives the reader just that. The book approaches EJB from both perspectives; from the client side, examining the container's responsibilities to the client and from the server side looking at the invocation interaction with the container. The JBoss EJB container is extremely modular which lends itself to being very customizable. After coverage of the container the reader is then given a tour of entity beans - their locking mechanism, life cycle, possible deadlock issues and how to resolve such situations.

Chapters six and seven give the reader a walk-trough of the Java Messaging Service (JMS) and the J2EE Connector Architecture (JCA) respectively. Similarly to the previous topics already ticked off, JMS and the JBoss provider – JBossMQ is approached in a example led manner, focusing on JBoss specifics and configuration. Likewise chapter seven looks at JBoss's implementation of another standard – JCA in the form of JBossCX. Again a quick review of the basics is covered along with the APIs involved before describing the architecture of JCA within JBoss. While many connectors are JDBC based, others fall out of this scope and those generic JCA connectors are discussed at the end of the chapter.

A cornerstone of any J2EE application server is security, and JBoss is no exception. JBoss supports the J2EE role based security model as well as providing additional protection through the integration of custom security – both covered by the JBossSX extension framework. Chapter eight brings the user up to speed with a gentle introduction of the standard J2EE declarative security model, followed by the details of the JAAS API which JBoss security is based upon. With the groundwork complete, next up is an examination of the components involved in the Secure Remote Password (SRP) server / client framework. SRP is an implementation of a public key exchange handshake similar to algorithms such as RSA of Diffie-Hellman. The chapter winds down with the JBoss's relationship to the standard Java 2 Security Manager, a look at SSL and Java Secure Socket Extension (JSSE) and finally the steps to configure JBoss behind a firewall.

Before JBoss there were Web Applications and the Apache Tomcat web container. Tomcat 5 is bundled with JBoss and this integration is toured in this chapter, from setting up a simple web application to configuring SSL and clustering. Having concentrated on Tomcat as the web container of choice for JBoss, the book then examines the process is integrating a different third-party servlet container.

Chapter ten is a catch all for the MBean services which are not covered in the book up to this point. The chapter meanders over varying subjects including logging with the popular Log4J service to dynamic class loading with RMI.

When working with EJBs or more specifically Entity Beans, there are two persistence models – bean-managed and container-managed. For Container Managed Persistence (CMP) to be applied the vendor must support it within their application server. Chapter eleven focuses on the CMP engine within JBoss using a fictitious crime portal application as the example to underline the theory!

Where chapter 9 covered the age old technology of web applications, chapter 12 branches out with the recent feature of web services – an exciting concept of exposing component interfaces as consumable services. The chapter is a breath of fresh air from traditional web services material, approaching the subject from developer biased bottom up perspective diving straight into JAX-RPC. In contrast to many of the other chapters, basic web service concepts such as SOAP and WSDL are met without any introduction, so a reader without the prerequisite knowledge will need to look elsewhere to fully grasp all that is mentioned.

Chapter thirteen, definitely the shortest chapter in the book, gives a brief introduction to Hibernate – an object/relational persistence engine and how it integrate with JBoss.

The book comes to a close with a look at the Aspect-Orientated Programming (AOP) paradigm, an extension to the traditional Object-Orientated approach to software development. The promise of AOP is to dramatically simply the development of enterprise middleware applications so it should come as no surprise that building JBoss AOP applications differs from normal Java development! The rational for AOP is explained before looking at building AOP applications for JBoss and their subsequent packaging and deployment.

JBoss 4.0 – The Official Guide is an excellent tutorial in everything JBoss, offering coverage on a wide range of topics for the novice and experienced JBoss developer alike. The balance of theory and practical examples is well judged and all Java developers will come away with greatly increased clarity into the most popular Java application server in the market today.


Purchase JBoss 4.0 – The Official Guide at Novell Press

Other Cool Solutions for Developers articles on JBoss :

An Introduction to JBoss
Multi-tiered Service-Oriented Systems with JBoss
Multi-tiered Service-Oriented Systems with JBoss, Part 2

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates