JBoss Tools is a collection of Eclipse plugins. JBoss Tools a project creation wizard for Seam, Content Assist for the Unified Expression Language (EL) in both facelets and Java code, a graphical editor for jPDL, a graphical editor for Seam configuration files, support for running Seam integration tests from within Eclipse, and much more.
In short, if you are an Eclipse user, then you'll want JBoss Tools!
JBoss Tools, as with seam-gen, works best with JBoss AS, but it's possible with a few tweaks to get your app running on other application servers. The changes are much like those described for seam-gen later in this reference manual.
Start up Eclipse and select the Seam perspective.
Go to File -> New -> Seam Web Project.
First, enter a name for your new project. For this tutorial, we're going to use helloworld
.
Enter a name for the runtime, and locate it on your hard drive:
On the next screen give the server a name, and hit Finish:
Locate MySQL 5, and hit Add...:
Choose the MySQL JDBC Driver template:
Locate the jar on your computer by choosing Edit Jar/Zip:
Review the username and password used to connect, and if correct, hit Ok.
Finally, choose the newly created driver:
Finally, review the package names for your generated beans, and if you are happy, click Finish:
-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512
If you don't have so much memory available, the following is our minimum recommendation:
-Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256
First, select New -> Seam Action:
Now, enter the name of the Seam component. JBoss Tools selects sensible defaults for other fields:
The first step is to create a form. Select New -> Seam Form:
Now, enter the name of the Seam component. JBoss Tools selects sensible defaults for other fields:
Go to http://localhost:8080/helloworld/hello.seam
. Then take a look at the generated code. Run the test. Try adding some new fields to the form and Seam component (note, you don't need to restart the app server each time you change the code in src/action
as Seam hot reloads the component for you Section 3.6, “Seam and incremental hot deployment with JBoss Tools”).
JBoss Tools supports incremental hot deployment of:
You need to be aware of the following limitations:
components deployed via
components.xml
may not be hot-deployedthe hot-deployable components will not be visible to any classes deployed outside of
WEB-INF/dev
Seam debug mode must be enabled and
jboss-seam-debug.jar
must be inWEB-INF/lib
You may see errors if the system is placed under any load and debug is enabled.