Building Your Own JBoss Configuration

When I first installed the JBoss server on my computer, unpacking it in its own dedicated directory and starting it up for the first time, I was bewildered. For those of you with beginning-to-medium experience with this application server the startup messages are daunting. The first version of JBoss I worked with was 3.2.3. If you take that package, unpack it and run it, you will be faced with 315 lines of messages, and mostly they look like gibberish. (To be fair, the newest version 4.0.0 I brought up with about 70 lines.)

My point here is not to complain about "too many messages" or the quality of the logging, but to simply state that my initial (uneducated) reaction was "Wow, how bloated is this!?"

But I was wrong.

What I find cool about JBoss—and the creators are very proud of this—is that it is a completely modular system. The whole "Java 2 Enterprise Edition" specification is HUGE, with all sorts of "Enterprise Grade" technologies including a messaging server, a web server (Tomcat or Jetty or both, depending on the version), a Transaction Server, an EJB Server/Container, Clustering support, Security and even AOP services... Each one of these components is pretty damned impressive. The whole collection is (for me) a bit mind-boggling. But the beauty of JBoss is that it has been designed so it can run as much or as little as you want!

The actual JBoss "MicroKernel" is actually a really lightweight package that I can load up in a mere 3.1 seconds! If I wanted to install only the Tomcat server, I could have this small "microkernel" running Tomcat as a service. Unlike the unpack-Tomcat-somewhere approach, I would drop a single module into the right directory, and voila—I would have the advantage of knowing I could always add additional services to my Tomcat server down the line. I could do the same thing it I just wanted a JMS messaging server and nothing else. And for those of you who are interested in the newest craze—Aspect Oriented Programming—there's a dynamic AOP module that you could play around with.

Again, it's all about the JBoss MicroKernel and adding just what you want. The system is built on Sun's official JMX (Java Management Extensions) specification, which means that you can write your own "services" if desired. They would simply be deployed according to an established standard.

The JBoss developers are taking this modular design philosophy to the extreme. Although this is far beyond the scope of a simple article, JBoss is using its AOP design to drive existing and future EJB development toward a similar a la carte approach where you simply assign "services" to your various Enterprise Java Beans. Their basic philosophy is that you, the customer, should build your own Application Server that is custom tailored to your own personal needs.

I'm currently working on a pretty complex EJB application, and I've decided that the best way to save resources and streamline performance is to pare down my JBoss environment to one that provides exactly the services I need and no more. I'm writing this article as a tutorial that will show you how the basic "build your own server" approach works. I'll start with an empty slate and add just two services —JMS and Tomcat. I'll try to point out the available reference material that's available for you to use as you take it from there.

I would suggest that this approach may also be the best way to really learn how JBoss really works. There's nothing like taking the services one-by-one and looking at their individual configuration options, understanding their dependencies, etc.

Contents:

  1. Unpacking JBoss and Initial Startup
  2. JBoss Server Configurations
  3. Adding Our Tomcat Service
  4. Adding Our JMS Service
  5. References and Additional Reading

Murray is an actor/filmmaker/writer/computer geek in Los Angeles, CA. He's become a fanatical OS X user since its early prerelease days. Before that he worked hard on "that new-fangled thing called Linux". Perhaps the biggest feather in his "Macintosh cap" is being co-author of the Wrox Press book, "Early Adopter Mac OS X Java".

 

 
 

Written material copyright © 2004 by Murray Todd Williams

Page last modified 10/29/2004 15:35