5.8. Seam and incremental hot deployment
Some support for incremental hot deployment is included during development when you deploy your Seam application as an exploded directory. Add the following line to
components.xml file to enable debug mode in Seam and Facelets:
<core:init debug="true">
Warning
Hot deployment of Facelets does not work if the hot deployment scanner is not enabled for the server profile.
The following files may now be redeployed without requiring a full restart of the web application:
- any Facelets page
- any
pages.xmlfile
To change any Java code, do a full restart of the application. In JBoss, this can be accomplished by touching the top-level deployment descriptor:
application.xml for an EAR deployment, or web.xml for a WAR deployment.
Seam supports incremental redeployment of JavaBean components for a fast edit/compile/test cycle. To use this, deploy the JavaBean components in the
WEB-INF/dev directory. Here, the JavaBean components are loaded by a special Seam classloader instead of the WAR or EAR classloader.
This function has the following limitations:
- The components must be JavaBean components — they cannot be EJB3 beans. (Seam is working to remove this limitation.)
- Entities can never be hot-deployed.
- Components deployed with
components.xmlcannot be hot-deployed. - Hot-deployable components are not visible to classes deployed outside
WEB-INF/dev. - Seam debug mode must be enabled and
jboss-seam-debug.jarmust be included inWEB-INF/lib. - The Seam filter must be installed in
web.xml. - You may see errors if the system is placed under any load and debug is enabled.
For WAR projects created with seam-gen, incremental hot deployment is available out of the box for classes in the
src/hot source directory. However, seam-gen does not support incremental hot deployment for EAR projects.