JBoss - The Basics

This is not for the experienced JBoss application server user. It is meant to give the JBoss beginner the basics to running and deploying applications to JBoss 4.0.3 SP1.

JBoss Layout

JBoss is easy to understand if you know the way the directories are setup and how to work with them. First everything you will do to JBoss is in the install directory.

bin directory

The most important one here is the run.bat or run.sh. This will run the application server and display debug and information messages to the user in the session it is started in. To start JBoss simply use the run command from this directory. To stop the server do a CTRL-C in the session it was started in. There are also some other files there but this is the basics only so I will not discuss them.

lib directory

This is the "root" server lib directory. You don't usually have to nor want to do anything with these libs.

server directory

This is where the directories for the server instances are. This is where you will do most of your work.

default directory

The default directory is the directory for the default instance. This is the instance which is started if you do not specify an instance. If you are in need of multiple instances then you will need to duplicate this directory. So if you think that you will need more instances do yourself a favor and make a backup of this directory before doing anything else.

I will go through this directory and tell you a little about it and give you a little information which may come in handy in the future.


This is where all the configuration files for the paticular instance reside. These are more or less needed but you don't need to do much with them to work with the server. The only one I have changed in this directory is the log4j.xml because I wanted to add some different appenders to keep more concise logs.


This directory I have never done anything in and never even navigated to tell I decided to write this. The only think I could see of any interest is the wsdl directory which will hold a sub directory for each archive which holds a web service which holds the wsdl and wsdd files for each service.


This is the most important directory. It contains all the deployed applications archive files and the jbossweb-tomcat55.sar directory. The most important thing in the jbossweb-tomcat55.sar directory is the server.xml. This is the file which will need to be modified if you are going to have multiple instances running. If you do run multiple instances make sure you change the listening ports in the server.xml, refeer to the JBoss site for information on changing ports. To run a server with a different name use this command run -c instance_name. The next important directory is lib. It is where the archive files need to be put for the instance to find them. For instance if you are going to be using databases the database lib goes here. The log directory is next, it is where the logs for the instance get put. The temp and work are where the applications get expanded to and run from.


There are other directories but these are all you really need to worry about when getting started.

JBoss Deployment

Since JBoss hot deploys new applications it works very will for me. I simply build the project and then use a script to deploy it from a command prompt.

Source: Dru Devore's Blog


Shailendra said…
This comment has been removed by a blog administrator.

Popular posts from this blog

Installing Bugzilla on Windows

Online Hindi Radio Stations

Copy/Paste the block of text in vi/vim