Static Configuration

You can configure User Code Namespaces using static configuration in an XML or YAML file, or programatically. The configuration is applied on start-up.

To statically configure User Code Namespaces for your user code, you must do the following:

  • If not already done, Enable User Code Namespaces

  • Define the name of the User Code Namespaces

  • Define the locations of the resources

  • Identify the namespace used by the required user code in the data structure

You can also configure a default namespace, which can be used to provide resources when no specific User Code Namespaces have been configured. For example, a data structure without an associated namespace, a partition loss listener, or when you are using an API that is not namespace-aware. For further information on using the default namespace, see the Non-associated Namespaces topic.

If you want to instantiate and register a customization that looks up code in a namespace, you must also configure the permissions. For further information on permissions, see the Security and Client Security topics.

In the Hazelcast Configuration File

To use the hazelcast configuration file to configure User Code Namespaces, see the following topics:

  • Member Configuration. This explains how to define the name of the User Code Namespaces and the location of the related resources

  • Data Structures. This explains how to define the User Code Namespaces used by your data structures

Programatically

To configure User Code Namespaces programatically, see the Programmatic Configuration topic.