July 30, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Jumping Into JBoss

  • September 3, 2003
  • By Thornton Rose and David Thurmond
  • Send Email »
  • More Articles »

JBoss is a free, open source, application server that implements the complete Java 2 Enterprise Edition (J2EE) stack, including Java Server Pages (JSP), servlets, and Enterprise JavaBeans (EJB). For J2EE developers that are getting started with JBoss, this article presents the basics, including downloading, installation, application deployment, and data source configuration.

Tools

To run JBoss, you will need the following tools:

  • Java 2 Standard Edition SDK 1.3.1 or higher

Additionally, to develop applications for JBoss, you may want the following tools:

  • Ant 1.5 - Java build tool
  • XDoclet 1.1.2 - Javadoc plug-in for code generation
  • JBoss Project Template

Downloading

To get JBoss, go to www.jboss.org. JBoss is available there in two flavors: the standard bundle, which includes Jetty for web pages and servlets, and the Tomcat bundle, which includes (you guessed it) Tomcat instead of Jetty.

As of this writing, JBoss 3.2.1 is the latest stable release.

Installation

To install JBoss, first unzip the distribution file to a directory of your choice. A directory named JBoss-version should be created, and it should contain the following directories:

  • bin -- scripts
  • client -- client jars
  • docs -- documentation
  • lib -- server jars
  • server -- server configurations

Second, set the following environment variables:

  • JBOSS_HOME - Set to JBoss installation directory.
  • JAVA_HOME - Set to Java 2 SDK home directory.

Server Configurations

JBoss comes with three server configurations:

  • minimal - This configuration includes only logging, the JNDI service, and the URL deployment scanner. You would want to use this configuration for starting services that don't require J2EE or as the base for a custom configuration.

  • default - This configuration is the default. It includes all of the J2EE services exception RMI/IIOP and clustering.

  • all - This configuration includes all JBoss services.

Startup

To start JBoss:

  • Windows:

    1. Open an MS-DOS Prompt or Command Prompt window.
    2. cd %JBOSS_HOME%\bin
    3. run [-c default|minimal|all]

  • Unix:

    1. Open a shell.
    2. cd $JBOSS_HOME/bin
    3. ./run [-c default|minimal|all]

If JBoss starts successfully, you should see something like this:

21:11:16,637 INFO [Server] JBoss (MX MicroKernel) [3.2.1 (build: CVSTag=JBoss_3 _2_1 date=200305041533)] Started in 26s:919ms

Once the server is started successfully, you can verify that all of the J2EE services are up and running by opening http://localhost:8080/jmx-console/ in your browser. The JBoss Management Console will start. It shows all of the services included in the currently running JBoss configuration and various details about each service.

JBoss can also run as an NT Service or a Unix service. For more information on how to do either, see the "JBoss 3.0 Quick Start Guide".

Shutdown

If you started JBoss in the foreground from an MS-DOS Prompt window, Command Prompt window, or Unix shell, simply press Ctrl-C in the window where JBoss is running.

To shutdown JBoss in the window or shell where it is running, press Ctrl-C.

To shutdown JBoss from another window or shell:

  • Windows:

    • Open an MS-DOS Prompt or Command Prompt window.
    • cd %JBOSS_HOME%\bin
    • shutdown -S or shutdown --server=url

  • Unix:

    • Open a shell.
    • cd $JBOSS_HOME/bin
    • ./shutdown -S or ./shutdown --server=url





Page 1 of 3



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel