Live Class and Template Reloading
Wiki Markup |
---|
{float:right|background=#eee}
{contentbylabel:title=Related Articles|showLabels=false|showSpace=false|space=@self|labels=class-reloading}
{float} |
One of the great features of Tapestry 5 is automatic reloading of changed classes and templates. Page and component classes will automatically reload when changed. Likewise, changes to component templates and other related resources will also be picked up immediately. In addition, starting in version 5.2, your service classes will also be reloaded automatically after changes (if you're using Tapestry IoC).
...
Persistent field data on the pages will usually not be affected (as it is stored separately, in the session). This allows you to make fairly significant changes to a component class even while the application continues to run.
...
Packages Scanned
Only certain classes are subject to reload. Reloading is based on package name; the packages that are reloaded are derived from the application configuration.
...
- org.example.myapp.pages
- org.example.myapp.components
- org.example.myapp.mixins
- org.example.myapp.base
- org.example.myapp.services (Tapestry 5.2 and later, with restrictions)
Since | ||
---|---|---|
| ||
Since Starting in Tapestry 5.2, live class reloading includes service implementation classes are also reloaded automatically after changes. There are some limitations to this (see below). See Service Implementation Reloading for more details. |
File System Only
Reloading of classes and other files applies only to files that are actually on the file system, and not files obtained from JAR files. This is perfect during development, where the files in question are in your local workspace. In a deployed application, you are somewhat subject to the implementation of your servlet container or application server.
...