Autoloading ModulesPage edited by Bob Harner
Comment:
Renamed
Changes (0)
Full ContentAutoloading ModulesAn important part of Tapestry IoC is the autoloading of modules; this allows new features to be added to an application just by "dropping in" a JAR that contains a module: the services in the module are automatically integrated into the overall service registry, along with any configuration or other supporting code and resources. An example of this is the tapestry-upload library, which introduces an Upload component, along with supporting services related to handling file upload requests. The core Tapestry IoC module is automatically included. When using the Tapestry web framework, the core Tapestry module is also included, as is an optional per-application module, plus any autoloaded modules. Module autoloading isn't 100% free ... you must tell Tapestry IoC where the modules to load are located, which can be done via a Manifest file entry, or via an annotation. JAR Manifest EntriesWhen setting up the registry, Tapestry can automatically locate modules packaged into JARs. It does this by searching for a particular global manifest entry. The manifest entry name is "Tapestry-Module-Classes". The value is a comma-separated list of fully qualified class names of module classes (this allows a single JAR to contain multiple, related modules). Whitespace is ignored. Example: Manifest-Version: 1.0 Tapestry-Module-Classes: org.example.mylib.LibModule, org.example.mylib.internal.InternalModule
Change Notification Preferences
View Online
|
View Changes
|