I've sucessfully implemented NetBeans 6.0 M10 and Netbeans 5.5.1 projects using the JBOSS Seam framework. I can successfully deploy these projects to both Glassfish V1, JBoss 4.2.0, and JBoss 4.1. This blog post is a log so that I can remember the specific JAR files and details required for each of these projects. I intend to add onto this blog as time goes on and I encounter more detailed information.
Seam 1.2.1 GA and Glassfish V1:
This project utilizes the Ajax4Jsf and RichFaces APIs. I have been unable to make this setup work with Glassfish V2 as yet. If you have figured that one out, please let me know.
Follow these steps in either NB 5.5.1 or NB 6.0 M10
1) Create new Enterprise Application, and also create the following libraries within the IDE:
Seam1.2.1-GlassfishV1
hibernate-all.jar
hibernate-annotations.jar
jboss-common.jar
jboss-seam-debug.jar
jboss-seam-pdf.jar
jboss-seam-ui.jar
jboss-seam.jar
thirdparty-all.jar
jbpm-3.1.2.jar (If you plan to use JBpm...I have not tested as yet)
Ajax4Jsf
ajax4jsf-1.1.1.jar
commons-collections.jar
oscache-2.3.2.jar
richfaces-3.0.1.jar
2) Add those two libraries to your ejb sub-project along with these others:
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-digester-1.6.jar
jboss-archive-browsing.jar
jsf-facelets.jar (unless you intend to add facelets support via the ide)
3) Add the following JARs to your war sub-project:
dom4j.jar (may not need this one...)
jboss-seam-ui.jar
4) Add configuration files to your ejb sub-project:
a) Add ejb-jar.xml to src/conf
b) Create empty seam.properties within src/conf
c) Create log4j.xml within src/conf
- Easiest configuration is to copy one of the log4j.xml files contained in the
example projects within the Seam 1.2.1 GA download.
d) Create persistence.xml within src/conf
- Use NetBeans to create persistence unit by right-clicking on the ejb sub-project
and then selecting New->Persistence Unit. Follow directions to create a unit
based upon one of the existing database connections you have defined in the IDE.
I use Toplink by default, but Hibernate works just as well.
5) Add configuration files to your war sub-project
a) Configure web.xml and faces-config.xml as suggested in Carol McDonald's Blog or Brian Leonard's Blog. It is also a good idea to take a look at the web.xml file from within one of the sample projects which comes with your Seam download. You will require a Seam filter, and Ajax4Jsf context-parameter if you plan to use that technology. I almost always use the same configuration contained within the sample project web.xml files, but also add the ejb references as discussed in the blog posts above.
b) Make sure the following additional xml files reside within your WEB-INF directory:
components.xml - Copy and use the one from the glassfish example in your Seam download. You will need to update it according to your ejb project name.
c) You may need to add META-INF to root of web pages and place application.xml within it.
I'll add the other configurations as time goes on, but this one will get you started with Seam application development on Glassfish V1.