Browse DevX
Sign up for e-mail newsletters from DevX


Get Started with JBoss Application Server-2 : Page 2




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Setting Up JBoss
JBoss 3.0 is currently in Alpha stage (and expected to make significant strides in the area of clustering). The current stable release is version 2.4.4.

The first step in getting up and running with JBoss is to download and install the server:

  1. Make sure you have a 1.3+ version of the JVM.
  2. Download the latest stable version of the JBoss distribution at http://www.jboss.org/.
  3. Uncompress the archive into the desired directory. An installation directory (JBoss-x.x.x/) will be created there.
  4. Create an environment variable (variable name: JBOSS_DIST) pointing to the location of the JBoss directory (variable value: path_to_jboss).
  5. Test the installation by executing the run script from the /bin directory.
When you start the server up, you should see a bunch of output from the script giving you more information than you could ever want about exactly what is going on with JBoss. Your eyes will glaze over from several screens of text scrolling past, but you'll know everything went well if it ends with a single line indicating that the JBoss server started in a certain number of seconds. (Actually, you'll want to glance back at the text output and make sure that no exceptions were thrown during startup).

One file note: If you want to configure the server security, transaction handling, database access, or resource management, use the jboss.jcml file under the conf/default directory.

Deploying a Simple Bean
JBoss has three deployment descriptors for declaring the deployment properties for enterprise beans:

  • ejb-jar.xml - This is the standard EJB deployment descriptor, declaring the available enterprise beans, their logical names, interfaces, and other deployment properties (security, transactions, etc.). For a look at a sample ejb-jar.xml file, click here.
  • jboss.xml - This optional file is used to specify a different JNDI name for a bean's home interface. The default JNDI name for a bean is the ejb-jar.xml ejb-name element value.
  • jaws.xml - This file is necessary only for CMP entity bean deployment.

We are concerned with only the ejb-jar.xml and jboss.xml files.

Comment and Contribute






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



Thanks for your registration, follow us on our social networks to keep up-to-date