Pages

Monday, July 25, 2011

JBoss Basic’s

Share it Please

In This article we will see the basics of JBoss application server, its directory structure and how to construct a basic cluster. Let’s start with the basics of JBoss.

Introduction

JBoss is an open source application server which is complete implementation of the java EE suite of services. Since JBoss is a java based application server, it is a cross platform. It can install on any operating system that supports java. We can download JBoss from the Here.

Directory Structure

When you download the JBoss zip from the website, extact that to see the following directories,

Bin: bin contains all the scripts that allow us to start and stop the server and many other tools for exploring the JBoss server (twiddle), discovering the JBoss clusters (probe), and some tools for web services.

Client: the client directory contains libraries that are to be used by an application if it needs to communicate with the server instance. For example, if we write an application which connects to a JBoss server instance, then all the jars in this client directory should be available in application class path. We generally don’t place our libraries in directory unless we are writing a JBoss client application or when we are extending JBoss server functionality. If we need to use libraries in this, we can use jbossall-client.jar available in this directory in place all jars.

Lib: the lib directory contains jars that should be available to all servers in order to run. This directory contains server startup libraries. We place our libraries when we are extending the server functionality.dont place your library unless needed.

Common/lib: This directory contains libraries that are to be shared across all server profiles. If we need to provide any global library that is to be used by all applications in all server profiles, we can place the library here.

Lib/endorsed: This directory contains libraries that JBoss uses. If we need to override with a new version of library that JBoss uses, we can place them here.

Server: contains the JBoss server profiles.
The server profiles available in this directory are

Default: contains default configurations needed for most basic java applications. Does not include clustering.
Minimal: contains minimal configuration including jndi and some deployers.
All: starts all services that come with JBoss including the clustering.

Exploring a Server Profile Structure

Every profile contains
Conf: conf directory holds files that are needed for server wide configuration.
Deploy: place where applications are deployed
Deployers: place contains various jars that help in recognizing the application and making them to get deployed.
Lib: contains libraries that are shared for all applications in the current profile.

The following directories are created when the server is running.

Log: contains log information.
Temp: Stores temporary data from various services.
Data: used by the services and applications those need to write to file system.
Work: used by the web server to store compiled jsp pages.

Starting & Stopping Server

Once we are aware of the basics and directory structure lets see how we can start and stop the server,

<Server>/bin/run.sh –c default (starts the default server,-c allows us to select various profiles)

Check the console for this line,

[org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 50s:318ms

This tells us that the server is started completely. In order to see whether it started or not, go to browser and type http://localhost:8080/admin-console.

Enter the username “admin” and password “admin”.

<server>/bin/shutdown.sh –S (stops the server)

More Articles to come, Happy coding… J

1 comment :

  1. I've been exploring for a bit for any high quality articles or blog posts in this sort of space .
    Exploring in Yahoo I finally stumbled upon this site.
    Studying this information So i am satisfied to exhibit that
    I've an incredibly excellent uncanny feeling I discovered just
    what I needed. I such a lot for sure will make sure to don?t overlook this site and provides it a look on a constant basis.

    ReplyDelete