You can use the User Code Deployment at the client side for the following situations:

  1. You have objects that will run on the cluster via the clients such as Runnable, Callable, and Entry Processors.
  2. You have new or amended user domain objects stored in the members (in-memory format of the IMap set to Object) which need to be deployed onto the cluster.

When this feature is enabled, the clients will deploy these classes to the members. By this way, when a client adds a new class, the members will not require restarts to include the new classes in classpath.

You can also use the client permission policy to specify which clients are permitted to use User Code Deployment. Please see the Permissions section.

Configuring Client User Code Deployment

Client User Code Deployment feature is not enabled by default. You can configure this feature declaratively or programmatically. Following are example configuration snippets:

Declarative Configuration

<user-code-deployment enabled="true">
        <jarPath>sample.jar</jarPath> <!--from class path -->
    	<!-- for the classes available in client class path -->

Programmatic Configuration

ClientConfig clientConfig = new ClientConfig();
ClientUserCodeDeploymentConfig clientUserCodeDeploymentConfig = new ClientUserCodeDeploymentConfig();



Note that User Code Deployment should also be enabled on the members to use this feature.

Config config = new Config();
UserCodeDeploymentConfig userCodeDeploymentConfig = config.getUserCodeDeploymentConfig();
userCodeDeploymentConfig.setEnabled( true );