Seam is a framework from JBoss which helps you to develop enterprise level web 2.0 web applications. From the JBoss Seam site,
"JBoss Seam is a powerful new application framework for building next
generation Web 2.0 applications by unifying and integrating
technologies such as Asynchronous JavaScript and XML (AJAX), Java
Server Faces (JSF), Enterprise Java Beans (EJB3), Java Portlets and
Business Process Management (BPM)."
If you were to navigate to their home page, you would find them describing the most compelling reasons to use seam. Some of them being
- The first framework to use EJB 3.0 (really cool!)
- Easy way to do Ajax
- Backward compatibility with J2EE
The most compelling feature i found in this framework was the combination of the JSF managed beans with EJB entity beans, so that you dont have to keep passing data back and forth between the entity beans and the managed beans. Also, you can use hibernate validators in the entity beans for validation instead of writing your own validators or specifying validtaors in the JSP page.
1) To get started, you would need the latest JBoss AS, and seam.(i used jboss 4.2.1 GA and seam 2.0.0.CR2)
You can download them from
http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=16942&release_id=523619
http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=163777
The seam download contains examples which you can use to see seam in action (there are a whole bunch of these examples with different frameworks in use).
2) Edit the build.properties file present in <SEAM-INSTALL> dirs o that the jboss.home references your AS location. For example here is what i put in for my jboss.home in my E:\seam
3) When building seam, i encountered a build failure which expected me to put a jar called jboss-seam-ui.jar and jboss-seam-ui-resources.jar inside a folder called "target" inside the "ui" folder.
i.e /ui/target. These jars can be found in the lib/ and lib/src directories
4) Make sure you have a working direct internet connection. The build process seams to download a lot of jars required for seam to build. If the build fails because it couldnt not download the jars, it instructs you to download them manually and install them. I made sure that i removed my proxy connection and had a direct internet connection so that the build process could go and fetch the jars from the seam repository.
5) Now we are all set to build and run seam examples. Go inside the examples/ directory and issue an "ant" command.The build will complete successfully.
6) Go inside an example app (i used the registration example. it seemed the simplest of them all). and issue another "ant" command.
7) Start the JBoss app server and deploy the generated "ear" file into the server. (I copied the ".ear" file into <jboss-as-dir>/server/default/deploy dir).
8) Open your web browser and point it to http://localhost:8080/seam-registration.
This particular example uses JSF 1.2 with facelets
You can go ahead modify these applications and see how things work.
For more instructions, there is a very good JBoss seam wiki at:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSeam
and a good tutorial at:
http://labs.jboss.com/jbossseam/j2ee/part01.html