JBoss Examples

Interest
Applet
JavaMail
CMP
JAWS
JMS

JBoss comes with a set of examples that cover various J2EE and JBoss concepts.  I have converted most of the examples into Eclipse projects, so you can experiment with the code.  You can get more information about the examples in the JBoss 2.4+ Documentation.

Install Example Projects

  1. Click Window, click Preferences, expand Java node, click Classpath Variables and click New...
  2. Put JBOSS_DIST in Name.
  3. Click Folder... and navigate to C:/jboss-3.0.1RC1_tomcat-4.0.4, click OK, click OK and click Yes.
  4. Open projects.zip shipped with this document.
  5. Extract entire contents including folder names from projects.zip to C:\eclipse\workspace.

Concepts

bulletEclipse Classpath Variables (Window, Preferences, Java, Classpath Variables) are used to incorporate folders or jars into your project.  This makes it easy to upgrade libraries by simply changing where the Classpath Variable points.
bulletAn exploded ear file is the uncompressed structure representing the ear file format.  JBoss can deal with ears and wars in this uncompressed format, which makes it ideal for debugging and HotSwap class replacement.  Basically you can unzip an ear file to a directory to see its structure.  All work is done outside the exploded ear folder.  Eclipse deploys the classes for you and the build.xml does the rest.  You should never modify the ear folder directly as you will loose any changes when an Ant target rebuilds it.
bulletThe Eclipse Build output folder (Right-click on project, Properties, Java Build Path) is where the class files are stored after a compile.  For a JBoss project this could be your Servlets, EJBs, clients, etc that go directly in the exploded ear or war file.  This removes the step of deploying your classes manually.
bulletEclipse Required projects on the build path (Right-click on project, Properties, Java Build Path, Projects) allows you to link several projects together.  Since you cannot always put client and server code together in one project itís handy to link them together.
bulletAnt scripts are used to automate many tasks such as building ear folder, building war folder, copying templates and deployment descriptors, copying JBoss configuration files, creating jars, creating and deploying compressed ears, etc.  In Eclipse just right click on the build.xml and click Run AntÖ to see the targets you can run.
Home | JBoss | Terminal Server Last updated on 08/07/2002