This is a prerelease version.

View latest

Migrate from User Code Deployment

User Code Namespaces improves and extends the capabilities of User Code Deployment and is applicable to more use cases. Hazelcast recommends that Enterprise Edition users deprecate their User Code Deployment implementations and migrate to using User Code Namespaces.

To migrate your existing User Code Deployment, enable User Code Namespaces and complete the configuration as described in Enable User Code Namespaces.

There are several differences between User Code Deployment and User Code Namespaces that you must account for when migrating:

  • User Code Namespaces does not have any configuration elements for Hazelcast Clients: all static configuration is managed in member configurations. This means that resources deployed statically need to be referenceable by all members of the cluster. For more information, see Member Configuration.

  • Resources deployed with User Code Deployment are added to the member classpath. In contrast, User Code Namespaces introduces namespaces, which allows resources to be separated. This separation allows conflicting classes to exist in separate namespaces without issue. However, data structures will need to reference the correct namespace to access the relevant resources. If you want to achieve similar behaviour to User Code Deployment in User Code Namespaces, configure your resources in the default namespace, which means they will be available to all data structures that do not explicitly define a namespace.

  • User Code Namespaces does not support loading resources from the classpath and they should be defined from static locations instead. Resources, including classpath classes, can still be uploaded by clients to the cluster, but you will need to do this using the programmatic API. For more information, see Configure Client.

  • Resources in User Code Namespaces can be dynamically added or replaced at runtime. This provides various benefits, but you must ensure that resources are not removed from actively running operations, as this could cause errors. For more information, see Dynamic Configuration API.