WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Name:Dynamic Import
Description:Imports spaces specified in a configuration resource.
Category:accessor prototype

Dynamic Import is an accessor that must be instantiated from a prototype. You must instantiate the prototype in your module to create an accessor that can receive requests.


The layer1.DynamicImport prototype has the following initialisation parameters:

configMandatoryIdentifier 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:

  <config>Configuration resource specifies which spaces are imported.</config>
Import Requirements

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.

Service Driven Import

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.


Import Discovery

It is common to use the SimpleImportDiscovery accessor to discover imports using a push pattern.

Classloader implications

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.