Michaelzanussi.com header image

JBoss AS Notes

Getting Started with JBoss 4.0 (tutorial notes)

1. The links in the documentation may not be accurate, here’s where you can find the referenced files.

  • The J2EE 1.4 Tutorial Update 7 with complete PDF and example code can be found here [sun.com] at the bottom of the page.
  • The JBoss example/supplementary code jbossj2ee-src.zip can be found here [jboss.org] in the archive startguide40.zip, which also contains a PDF of the Getting Started with JBoss 4.0 guide. Note that jbossj2ee-src.zip should be unzipped in the folder where you unzipped the J2EE 1.4 tutorial, usually j2eetutorial14. The JBoss example code is meant to be added to the existing example code from Sun.

2. Error compiling Duke’s Bank Application: Ant build fails at jboss-build.xml:59: due to jboss-ws4ee.sar not found:

build_error_jboss-ws4eesar

jboss-ws4ee.sar can be found at JBOSS_DIST/docs/examples/ws4ee, where JBOSS_DIST is the top-level directory, in this example, /jboss-4.0.4.GA-ALL.

To resolve this error, simply copy the entire jboss-ws4ee.sar folder to JBOSS_DIST/server/default/deploy. JBoss hot deploy should recognize the folder and update accordingly:

jboss-ws4eesar-hot_deploy

Change Port Number

Changing the JBoss default port number from 8080 to some other value is very straightforward.

1. Locate server.xml in the JBOSS_DIST/server/default/deploy/jbossweb-tomcat55.sar directory, where JBOSS_DIST is the top-level directory, for example, /opt/jboss-4.0.4.GA.

2. Then, locate the appropriate connector and modify the port number, highlighted in blue below:

<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" address="${jboss.bind.address}"

3. Save server.xml, then restart JBoss. That simple.

Note that you should specify your actual configuration name in the directory above if it is different than default.