Version 20

    JBoss SEAM Shell Project

     

    Overview

     

    I&146;m currently working on a SEAM Shell application that has the following:

     

    1. A simple ant script with tasks for compiling, building and deploying a SEAM application (Basically a stripped down version of the SEAM examples build scripts)

    2. The build process actually builds the app into exploded archives, so that you can actually see where the descriptors are without having to crack open the .EAR, JAR or WAR archives.

    3. A simple JSP/facelet form that does a simple DB insert with some validation logic (right now I&146;m using HSQL or MySQL as the DB).

    4. Use a resource bundle for application messages (internationalization)

    5. A simple page flow example, using jBPM

    6. A simple BPM integration example, using jBPM

    7. A few simple testng(JUnit alternative) tests that run against the embedded ejb container, so that you can test outside the app server

     

    I have not documented the code fully, but it does work with HSQL and I&146;ve tested it on mySQL too. Only differences b/t mySQL and HSQL are:

     

    1. mysql jdbc driver needs to be added to /lib and the app server lib directory (server-side tests)

    2. /resources/datasource-ds.xml

    3. /embedded-ejb/conf/embedded-jboss-beans.xml(for testng only)

    4. /embedded-ejb/conf/default.persistence.properties

     

    Quick Start Guide

    1. Refer to JBossSEAMGen for downloading and creating the Seam Shell project

    2. Run the jboss-4.0.4GA installer and create an EJB3 (non-clustered) app server instance

    3. Edit $SEAM_SHELL_HOME/build.properties (make sure the jboss.home points to your new app server instance)

    4. run ant deploy (This will build and deploy the seam-shell ear to your app server)

    5. Open Browser to: http://localhost:8080/myapp/

     

    Status

     

    I plan on keeping the app very simple and I only plan on adding a simple list query page and maybe a better BPM example, so you can see that it works without having to open the console.

     

    What is this Sample Project Good For?

     

    This is a good starting point for your own application. It provides a working shell application and the source/properties file trees in the project are designed to show you where the right files should be by just placing them where they will be when the archive is built.

     

    Build Scripts

     

    • build.properties - properties file entry required for jboss.home

    • build.xml - simple build file with the following noteworthy tasks

      • deploy - will build and deploy the EAR/datasource to your app server instance

      • test - will run the testng suite

      • undeploy - will undeploy the EAR/datasource

      • clean - will remove the EAR from /dist and clean up the exploded archives

     

    Project Contents You Probably WON'T Change

     

    • dist - place where built EAR file is placed

    • embedded-ejb - ejb3 bootstrap configuration so you can run containerless unit tests

    • exploded-archives - This is a biggie, the directory that sheds light on where things should be in the EAR, JAR and WAR file. When in doubt about where a file should be in your custom built EAR you should cross-reference with this exploded archive.

      • seam-shell.ear - EAR archive which includes

        • seam-shell.jar (non-exploded)

        • seam-shell.war (non-exploded)

     

    Project Contents You Probably WILL Change

    • src - java source files

    • resources - properties and configuration files

    • view - JSPs/facelets, stylesheets