Skip to end of metadata
Go to start of metadata

XHTML files

XHTML files can be hot reloaded.

In order to activate this, you need to update the nuxeo.ear/config/nuxeo.properties file and uncomment the facelets.REFRESH_PERIOD=2 line (requires restart of Jboss).

The XHTML files will then be reloaded from nuxeo.ear/nuxeo.war/.

You can directly edit the XHTML files from here or copy manually the XHTML files you edited from your IDE into this directory.

NB : for production, this option has to be disabled

Seam components

Seam components can also be hot redeployed.

This can save a lot of time (and Jboss restarts).

To activate Seam Hot reload you need to create the file called nuxeo.ear/config/seam-debug.properties and install the suitable seam debug library for your version of nuxeo into the nuxeo.ear/lib folder. You can use our maven repository for selecting and downloading the jar.

Selecting the Seam Components that can be Hot Reloaded

Because of the way Seam Hot Reload works, you have to select what Seam Components must be hot reloadable.

This is done by telling the deployment system which bundle and what classes must be reloadable.

In your bundle, add the following lines at the end of you deployment-fragment.xml (since 5.4.2)

This instruct the deployer for extracting all the classes suffixed by Bean into the nuxeo.war/WEB-INF/dev folder and to extract the others into a new bundle-seamhotdeploy.jar folder and to rename the original jar to bundle.jar~seamhotdeploy.

For backward compability, we also include the classes selected in the seam-debug.properties in the config folder and the bundle's seam.properties.

How it works and what are the limitations?

During deployment preprocessing, the "hot reloadable jars" will be splitted :

  • Seam classes made for hot reload will be copied into nuxeo.ear/nuxeo.war/WEB-INF/dev
  • other jar ressources (class, xml, manifest ...) will remain in another jar that will be deployed instead of the original one

Classes in nuxeo.ear/nuxeo.war/WEB-INF/dev will be deployed by Seam in a separated class loader and will be hot-reloadale.

Since these classes are in a child classloader they can access other Seam components, but other Seam components can not see them.

How do I reload my classes?

You have to copy your updated classes into nuxeo.ear/nuxeo.war/WEB-INF/dev.

To trigger the hot reload, you can either:

How do I automatically hot reload with ant?

You add this code to your ant script :

and launch:

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 16, 2011

    On windows 7, the seam hotdeploy cannot be activated due to OS file system (bug during files renaming process).

    1. Jan 06, 2012

      What about Windows XP? Can seam hotdeploy be activated?

      1. Jan 06, 2012

        Hi,

        My post is outdated, sorry for that.

        The best way to use Seam hotdeploy is to download the new Nuxeo Eclipse plugin (Nuxeo IDE) - http://www.nuxeo.com/en/products/nuxeo-ide .

        The hotdeploy is working on all OS and documentation is right here -> Nuxeo IDE Documentation Center

        And of course if you have any question about this, don't hesitate to use http://answers.nuxeo.com/ .

        Thanks!