Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Scrollbar
Since
since5.2
 
Service implementation reloading is the live reloading of Tapestry-IOC service implementation classes without having to stop & restart the servlet container. Available for Tapestry 5.2 and later, it extends the developer productivity gains of Tapestry's Live Class Reloading to your Tapestry-IOC service modules.

Div
stylefloat:right
titleRelated Articles
classaui-label
Content by Label
showLabelsfalse
showSpacefalse
titleRelated Articles
cqllabel = "class-reloading" and space = currentSpace()

Why is this important?

On the one hand, a good application design keeps the page and component classes "thin" and moves logic into the services layer, for easier reuse across pages. On the other hand, moving logic into services would be less agile if those services didn't auto-reload the way Tapestry pages do.

...

The JVM should be able to eventually garbage collect the class loader. However, if the class publishes itself to some other service (for example, adding itself as a listener to an event published by some other service), then the instance and the garbage collector will be leaked.

Note

Be careful about publishing any instances of a reloadable class.

Update Checks

Update checks are normally driven by tapestry-core, which periodically checks for changed templates, message catalogs, and component classes. Checks for changed service implementation classes occur at the same time.

In an application that is not driven by the web tier, you will need to periodically invoke the fireCheckForUpdates() method of the UpdateListenerHub service (which was moved from tapestry-core to tapestry-ioc for this purpose).

 

Scrollbar