Chapter 5. Getting started with seam-gen
- 5.1. Before you start
- 5.2. Setting up a new project
- 5.3. Creating a new action
- 5.4. Creating a form with an action
- 5.5. Generating an application from an existing database
- 5.6. Generating an application from existing JPA/EJB3 entities
- 5.7. Deploying the application as an
EAR - 5.8. Seam and incremental hot deployment
Seam includes a command line utility that makes it easy to set up an Eclipse project, generate a simple Seam skeleton code, and reverse-engineer an application from a pre-existing database. This is an easy way to familiarize yourself with Seam. Seam-gen works best in conjunction with Red Hat JBoss Enterprise Application Platform.
Seam-gen can be used without Eclipse, but this guide focuses on using seam-gen with Eclipse. If you prefer not to use Eclipse, you can still follow this guide — all steps can be performed from the command line.
5.1. Before you start
JBoss Enterprise Application Platform has sophisticated support for hot redeployment of
WARs and EARs. Unfortunately, due to bugs in JVM, repeat redeployment of an EAR (common during development) uses all of the JVM's perm gen space. Therefore, we recommend you to run JBoss in a JVM with a large perm gen space during development.
If you are running JBoss from JBoss IDE, you can configure this in the server launch configuration, under "VM arguments". We suggest the following values:
-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
The minimum recommended values are:
-Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
If you are running the standalone profile of JBoss from the command line, you can configure the JVM options in
bin/standalone.conf.