|Description:||Imports spaces specified in a configuration resource.|
The layer1.DynamicImport prototype has the following initialisation parameters:
|config||Mandatory||Identifier or XML||(none)|
Configuration resource specifies which spaces are imported.
If included this parameter will mark the endpoint as private and it will not be exposed outside module.
Here is an auto-generated example of how to instantiate an instance of Dynamic Import:
To use Dynamic Import accessor prototype you must import the module urn:org:netkernel:ext:layer1:
The Dynamic Import endpoint provides a dynamic mechanism for importing the functionality from other spaces. This contrasts with the static import of a single space using the import endpoint which is built in to standard modules.
The dynamic import takes a config parameter which is SOURCEd as an XML document
Many space definitions may be provided within the configuration document. The version tag is optional - if omitted the default is the most recent version.
A common pattern within dynamic applications is to have pluggable application layers; for example data layers of styling layers. By referencing the identifier of a service in the Dynamic Import declaration it is possible to SOURCE the configuration from a service which reads which space to import from a database.
It is common to use the SimpleImportDiscovery accessor to discover imports using a push pattern.
Because the Dynamic Import can change the spaces that it imports at runtime it is not possible for the classloaders from imported spaces to be incorporated into the importing spaces classloader. This limitation is due way Java implements class loading. If the Java classes from an imported space are needed it is necessary to use the regular (static) import endpoint.