Fix minor warnings in code
[policy/apex-pdp.git] / testsuites / integration / integration-context-test / src / test / java / org / onap / policy / apex / testsuites / integration / context / TestConcurrentContext.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
4  *  Modifications Copyright (C) 2019 Nordix Foundation.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.apex.testsuites.integration.context;
23
24 import static org.junit.Assert.assertEquals;
25 import static org.junit.Assert.assertFalse;
26 import static org.junit.Assert.assertNotNull;
27 import static org.onap.policy.apex.context.parameters.DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS;
28 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.TEST_VALUE;
29
30 import java.io.File;
31 import java.io.IOException;
32 import java.net.InetSocketAddress;
33 import java.util.Map;
34 import java.util.SortedSet;
35 import org.junit.AfterClass;
36 import org.junit.BeforeClass;
37 import org.junit.Rule;
38 import org.junit.Test;
39 import org.junit.rules.TemporaryFolder;
40 import org.onap.policy.apex.context.impl.distribution.jvmlocal.JvmLocalDistributor;
41 import org.onap.policy.apex.context.impl.locking.jvmlocal.JvmLocalLockManager;
42 import org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters;
43 import org.onap.policy.apex.context.parameters.ContextParameterConstants;
44 import org.onap.policy.apex.context.parameters.ContextParameters;
45 import org.onap.policy.apex.context.parameters.DistributorParameters;
46 import org.onap.policy.apex.context.parameters.SchemaParameters;
47 import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
48 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
49 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
50 import org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor;
51 import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor;
52 import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters;
53 import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager;
54 import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManagerParameters;
55 import org.onap.policy.apex.plugins.context.locking.hazelcast.HazelcastLockManager;
56 import org.onap.policy.apex.testsuites.integration.context.lock.modifier.LockType;
57 import org.onap.policy.apex.testsuites.integration.context.locking.ConcurrentContext;
58 import org.onap.policy.apex.testsuites.integration.context.utils.ConfigrationProvider;
59 import org.onap.policy.apex.testsuites.integration.context.utils.ConfigrationProviderImpl;
60 import org.onap.policy.apex.testsuites.integration.context.utils.Constants;
61 import org.onap.policy.apex.testsuites.integration.context.utils.NetworkUtils;
62 import org.onap.policy.apex.testsuites.integration.context.utils.ZooKeeperServerServiceProvider;
63 import org.onap.policy.common.parameters.ParameterService;
64 import org.onap.policy.common.utils.resources.ResourceUtils;
65 import org.slf4j.ext.XLogger;
66 import org.slf4j.ext.XLoggerFactory;
67
68 /**
69  * The Class TestConcurrentContext tests concurrent use of context.
70  *
71  * @author Liam Fallon (liam.fallon@ericsson.com)
72  */
73 public class TestConcurrentContext {
74     private static final String HAZELCAST_CONFIG = "hazelcast.config";
75
76     private static final String JAVA_NET_PREFER_IPV4_STACK = "java.net.preferIPv4Stack";
77     private static final String HAZELCAST_XML_FILE = "src/test/resources/hazelcast/hazelcast.xml";
78
79     // Logger for this class
80     private static final XLogger logger = XLoggerFactory.getXLogger(TestConcurrentContext.class);
81
82     // Test parameters
83     private static final String ZOOKEEPER_ADDRESS = "127.0.0.1";
84     private static final int ZOOKEEPER_START_PORT = 62181;
85     private static final int TEST_JVM_COUNT_SINGLE_JVM = 1;
86     private static final int TEST_JVM_COUNT_MULTI_JVM = 3;
87     private static final int TEST_THREAD_COUNT_SINGLE_JVM = 64;
88     private static final int TEST_THREAD_COUNT_MULTI_JVM = 20;
89     private static final int TEST_THREAD_LOOPS = 100;
90
91     // We need to increment the Zookeeper port because sometimes the port is not released at the end
92     // of the test for a few seconds.
93     private static int nextZookeeperPort = ZOOKEEPER_START_PORT;
94
95     private int zookeeperPort;
96
97     private static SchemaParameters schemaParameters;
98
99     @Rule
100     public final TemporaryFolder folder = new TemporaryFolder();
101
102     private ZooKeeperServerServiceProvider zooKeeperServerServiceProvider;
103
104     /**
105      * Configure.
106      *
107      * @throws Exception the exception
108      */
109     @BeforeClass
110     public static void configure() throws Exception {
111         System.setProperty(JAVA_NET_PREFER_IPV4_STACK, "true");
112         final String hazelCastfileLocation = ResourceUtils.getFilePath4Resource(HAZELCAST_XML_FILE);
113         System.setProperty(HAZELCAST_CONFIG, hazelCastfileLocation);
114
115         final SortedSet<String> ipAddressSet = NetworkUtils.getIPv4NonLoopAddresses();
116
117         if (ipAddressSet.size() == 0) {
118             throw new Exception("cound not find real IP address for test");
119         }
120         logger.info("For Infinispan, setting jgroups.tcp.address to: {}", ipAddressSet.first());
121         System.setProperty("jgroups.tcp.address", ipAddressSet.first());
122
123         schemaParameters = new SchemaParameters();
124
125         schemaParameters.setName(ContextParameterConstants.SCHEMA_GROUP_NAME);
126         schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters());
127
128         ParameterService.register(schemaParameters, true);
129     }
130
131     /**
132      * Clear configuration.
133      */
134     @AfterClass
135     public static void clear() {
136         ParameterService.deregister(schemaParameters);
137     }
138
139     /**
140      * Start zookeeper server.
141      *
142      * @throws Exception the exception
143      */
144     private void startZookeeperServer() throws Exception {
145         final File zookeeperDirectory = folder.newFolder("zookeeperDirectory");
146
147         zookeeperPort = nextZookeeperPort++;
148         final InetSocketAddress addr = new InetSocketAddress(zookeeperPort);
149         zooKeeperServerServiceProvider = new ZooKeeperServerServiceProvider(zookeeperDirectory, addr);
150         zooKeeperServerServiceProvider.startZookeeperServer();
151     }
152
153     /**
154      * Stop zookeeper server.
155      */
156     private void stopZookeeperServer() {
157         if (zooKeeperServerServiceProvider != null) {
158             zooKeeperServerServiceProvider.stopZookeeperServer();
159         }
160     }
161
162     /**
163      * Test concurrent context jvm local var set.
164      *
165      * @throws Exception the exception
166      */
167     @Test
168     public void testConcurrentContextJvmLocalVarSet() throws Exception {
169         logger.debug("Running testConcurrentContextJVMLocalVarSet test . . .");
170
171         final ContextParameters contextParameters = new ContextParameters();
172         contextParameters.getLockManagerParameters().setPluginClass(JvmLocalLockManager.class.getName());
173         setContextParmetersInParameterService(contextParameters);
174
175         final ConfigrationProvider configrationProvider = getConfigrationProvider("JVMLocalVarSet",
176                 TEST_JVM_COUNT_SINGLE_JVM, TEST_THREAD_COUNT_SINGLE_JVM, TEST_THREAD_LOOPS);
177
178         final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
179         final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
180
181         assertFalse(result.isEmpty());
182
183         final int expected = TEST_JVM_COUNT_SINGLE_JVM * TEST_THREAD_COUNT_SINGLE_JVM * TEST_THREAD_LOOPS;
184         final TestContextLongItem actual = result.get(TEST_VALUE);
185         assertNotNull(actual);
186         assertEquals(expected, actual.getLongValue());
187
188         clearContextParmetersInParameterService(contextParameters);
189
190         logger.debug("Ran testConcurrentContextJVMLocalVarSet test");
191     }
192
193     /**
194      * Test concurrent context jvm local no var set.
195      *
196      * @throws Exception the exception
197      */
198     @Test
199     public void testConcurrentContextJvmLocalNoVarSet() throws Exception {
200         logger.debug("Running testConcurrentContextJVMLocalNoVarSet test . . .");
201
202         final ContextParameters contextParameters = new ContextParameters();
203         setContextParmetersInParameterService(contextParameters);
204
205         final ConfigrationProvider configrationProvider = getConfigrationProvider("JVMLocalNoVarSet",
206                 TEST_JVM_COUNT_SINGLE_JVM, TEST_THREAD_COUNT_SINGLE_JVM, TEST_THREAD_LOOPS);
207
208         final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
209         final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
210
211         final int expected = TEST_JVM_COUNT_SINGLE_JVM * TEST_THREAD_COUNT_SINGLE_JVM * TEST_THREAD_LOOPS;
212         final TestContextLongItem actual = result.get(Constants.TEST_VALUE);
213         assertNotNull(actual);
214         assertEquals(expected, actual.getLongValue());
215
216         clearContextParmetersInParameterService(contextParameters);
217         logger.debug("Ran testConcurrentContextJVMLocalNoVarSet test");
218     }
219
220     /**
221      * Test concurrent context multi jvm no lock.
222      *
223      * @throws Exception the exception
224      */
225     @Test
226     public void testConcurrentContextMultiJvmNoLock() throws Exception {
227         logger.debug("Running testConcurrentContextMultiJVMNoLock test . . .");
228
229         final ContextParameters contextParameters = new ContextParameters();
230         contextParameters.getDistributorParameters().setPluginClass(JvmLocalDistributor.class.getName());
231         contextParameters.getLockManagerParameters().setPluginClass(JvmLocalLockManager.class.getName());
232         setContextParmetersInParameterService(contextParameters);
233
234         final ConfigrationProvider configrationProvider = getConfigrationProvider("testConcurrentContextMultiJVMNoLock",
235                 TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
236
237         final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
238         final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
239
240         // No concurrent map so result will be zero
241         final TestContextLongItem actual = result.get(TEST_VALUE);
242         assertNotNull(actual);
243         assertEquals(0, actual.getLongValue());
244
245         clearContextParmetersInParameterService(contextParameters);
246         logger.debug("Ran testConcurrentContextMultiJVMNoLock test");
247     }
248
249     /**
250      * Test concurrent context hazelcast lock.
251      *
252      * @throws Exception the exception
253      */
254     @Test
255     public void testConcurrentContextHazelcastLock() throws Exception {
256         logger.debug("Running testConcurrentContextHazelcastLock test . . .");
257
258         final ContextParameters contextParameters = new ContextParameters();
259         contextParameters.getDistributorParameters().setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
260         contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getName());
261         setContextParmetersInParameterService(contextParameters);
262
263         final ConfigrationProvider configrationProvider = getConfigrationProvider("HazelcastLock",
264                 TEST_JVM_COUNT_SINGLE_JVM, TEST_THREAD_COUNT_SINGLE_JVM, TEST_THREAD_LOOPS);
265
266         final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
267         final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
268
269         final int expected = TEST_JVM_COUNT_SINGLE_JVM * TEST_THREAD_COUNT_SINGLE_JVM * TEST_THREAD_LOOPS;
270         final TestContextLongItem actual = result.get(TEST_VALUE);
271         assertNotNull(actual);
272         assertEquals(expected, actual.getLongValue());
273
274         clearContextParmetersInParameterService(contextParameters);
275         logger.debug("Ran testConcurrentContextHazelcastLock test");
276     }
277
278     /**
279      * Test concurrent context curator lock.
280      *
281      * @throws Exception the exception
282      */
283     @Test
284     public void testConcurrentContextCuratorLock() throws Exception {
285         logger.debug("Running testConcurrentContextCuratorLock test . . .");
286         final ContextParameters contextParameters = new ContextParameters();
287         try {
288             startZookeeperServer();
289             final DistributorParameters distributorParameters = contextParameters.getDistributorParameters();
290             distributorParameters.setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
291
292             final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
293             curatorParameters.setPluginClass(CuratorLockManager.class.getName());
294             curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
295             contextParameters.setLockManagerParameters(curatorParameters);
296             setContextParmetersInParameterService(contextParameters);
297
298             final ConfigrationProvider configrationProvider = getConfigrationProvider("CuratorLock",
299                     TEST_JVM_COUNT_SINGLE_JVM, TEST_THREAD_COUNT_SINGLE_JVM, TEST_THREAD_LOOPS);
300
301             final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
302             final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
303
304             final int expected = TEST_JVM_COUNT_SINGLE_JVM * TEST_THREAD_COUNT_SINGLE_JVM * TEST_THREAD_LOOPS;
305             final TestContextLongItem actual = result.get(TEST_VALUE);
306             assertNotNull(actual);
307             assertEquals(expected, actual.getLongValue());
308             logger.debug("Ran testConcurrentContextCuratorLock test");
309         } finally {
310             stopZookeeperServer();
311             clearContextParmetersInParameterService(contextParameters);
312         }
313     }
314
315     /**
316      * Test concurrent context hazelcast multi jvm hazelcast lock.
317      *
318      * @throws Exception the exception
319      */
320     @Test
321     public void testConcurrentContextHazelcastMultiJvmHazelcastLock() throws Exception {
322         logger.debug("Running testConcurrentContextHazelcastMultiJVMHazelcastLock test . . .");
323
324         final ContextParameters contextParameters = new ContextParameters();
325         final DistributorParameters distributorParameters = contextParameters.getDistributorParameters();
326         distributorParameters.setPluginClass(HazelcastContextDistributor.class.getName());
327         contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getName());
328         setContextParmetersInParameterService(contextParameters);
329
330         final ConfigrationProvider configrationProvider = getConfigrationProvider("HazelcastMultiHazelcastlock",
331                 TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
332
333         final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
334         final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
335
336         final int expected = TEST_JVM_COUNT_MULTI_JVM * TEST_THREAD_COUNT_MULTI_JVM * TEST_THREAD_LOOPS;
337         final TestContextLongItem actual = result.get(TEST_VALUE);
338         assertNotNull(actual);
339         assertEquals(expected, actual.getLongValue());
340
341         clearContextParmetersInParameterService(contextParameters);
342         logger.debug("Ran testConcurrentContextHazelcastMultiJVMHazelcastLock test");
343     }
344
345     /**
346      * Test concurrent context infinispan multi jvm hazelcastlock.
347      *
348      * @throws ApexModelException the apex model exception
349      * @throws IOException Signals that an I/O exception has occurred.
350      * @throws ApexException the apex exception
351      */
352     @Test
353     public void testConcurrentContextInfinispanMultiJvmHazelcastlock()
354             throws ApexModelException, IOException, ApexException {
355         logger.debug("Running testConcurrentContextInfinispanMultiJVMHazelcastlock test . . .");
356
357         final ContextParameters contextParameters = new ContextParameters();
358         final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters();
359         infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getName());
360         infinispanParameters.setConfigFile("infinispan/infinispan-context-test.xml");
361         contextParameters.setDistributorParameters(infinispanParameters);
362         contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getName());
363         setContextParmetersInParameterService(contextParameters);
364
365         final ConfigrationProvider configrationProvider = getConfigrationProvider("InfinispanMultiHazelcastlock",
366                 TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
367
368         final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
369         final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
370
371         final int expected = TEST_JVM_COUNT_MULTI_JVM * TEST_THREAD_COUNT_MULTI_JVM * TEST_THREAD_LOOPS;
372         final TestContextLongItem actual = result.get(TEST_VALUE);
373         assertNotNull(actual);
374         assertEquals(expected, actual.getLongValue());
375
376         clearContextParmetersInParameterService(contextParameters);
377         logger.debug("Ran testConcurrentContextInfinispanMultiJVMHazelcastlock test");
378     }
379
380     /**
381      * Test concurrent context infinispan multi jvm curator lock.
382      *
383      * @throws Exception the exception
384      */
385     @Test
386     public void testConcurrentContextInfinispanMultiJvmCuratorLock() throws Exception {
387         logger.debug("Running testConcurrentContextInfinispanMultiJVMCuratorLock test . . .");
388
389         final ContextParameters contextParameters = new ContextParameters();
390         try {
391             startZookeeperServer();
392
393             final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters();
394             infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getName());
395             infinispanParameters.setConfigFile("infinispan/infinispan-context-test.xml");
396             contextParameters.setDistributorParameters(infinispanParameters);
397
398             final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
399             curatorParameters.setPluginClass(CuratorLockManager.class.getName());
400             curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
401             contextParameters.setLockManagerParameters(curatorParameters);
402             setContextParmetersInParameterService(contextParameters);
403
404             final ConfigrationProvider configrationProvider = getConfigrationProvider("InfinispanMultiCuratorLock",
405                     TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
406
407             final ConcurrentContext concurrentContext = new ConcurrentContext(configrationProvider);
408             final Map<String, TestContextLongItem> result = concurrentContext.testConcurrentContext();
409
410             final int expected = TEST_JVM_COUNT_MULTI_JVM * TEST_THREAD_COUNT_MULTI_JVM * TEST_THREAD_LOOPS;
411             final TestContextLongItem actual = result.get(TEST_VALUE);
412             assertNotNull(actual);
413             assertEquals(expected, actual.getLongValue());
414         } finally {
415             stopZookeeperServer();
416             clearContextParmetersInParameterService(contextParameters);
417         }
418
419         logger.debug("Ran testConcurrentContextInfinispanMultiJVMCuratorLock test");
420     }
421
422     /**
423      * Test concurrent context hazelcast multi jvm curator lock.
424      *
425      * @throws Exception the exception
426      */
427     @Test
428     public void testConcurrentContextHazelcastMultiJvmCuratorLock() throws Exception {
429         logger.debug("Running testConcurrentContextHazelcastMultiJVMCuratorLock test . . .");
430
431         final ContextParameters contextParameters = new ContextParameters();
432         try {
433             startZookeeperServer();
434
435             contextParameters.getDistributorParameters()
436                     .setPluginClass(HazelcastContextDistributor.class.getName());
437
438             final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
439             curatorParameters.setPluginClass(CuratorLockManager.class.getName());
440             curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
441             contextParameters.setLockManagerParameters(curatorParameters);
442             setContextParmetersInParameterService(contextParameters);
443
444             final ConfigrationProvider configrationProvider = getConfigrationProvider("HazelcastMultiCuratorLock",
445                     TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
446             final Map<String, TestContextLongItem> result =
447                     new ConcurrentContext(configrationProvider).testConcurrentContext();
448
449             final int expected = TEST_JVM_COUNT_MULTI_JVM * TEST_THREAD_COUNT_MULTI_JVM * TEST_THREAD_LOOPS;
450             final TestContextLongItem actual = result.get(TEST_VALUE);
451             assertNotNull(actual);
452             assertEquals(expected, actual.getLongValue());
453         } finally {
454             stopZookeeperServer();
455             clearContextParmetersInParameterService(contextParameters);
456         }
457         logger.debug("Ran testConcurrentContextHazelcastMultiJVMCuratorLock test");
458     }
459
460     /**
461      * Gets the configration provider.
462      *
463      * @param testType the test type
464      * @param jvmCount the jvm count
465      * @param threadCount the thread count
466      * @param threadLoops the thread loops
467      * @return the configration provider
468      */
469     ConfigrationProvider getConfigrationProvider(final String testType, final int jvmCount, final int threadCount,
470             final int threadLoops) {
471         return new ConfigrationProviderImpl(testType, jvmCount, threadCount, threadLoops, 16,
472                 LockType.WRITE_LOCK_SINGLE_VALUE_UPDATE.getValue()) {
473             @Override
474             public Map<String, Object> getContextAlbumInitValues() {
475                 final Map<String, Object> initValues = super.getContextAlbumInitValues();
476                 initValues.put(TEST_VALUE, new TestContextLongItem(0L));
477                 return initValues;
478             }
479
480         };
481     }
482
483     /**
484      * Set the context parameters in the parameter service.
485      *
486      * @param contextParameters The parameters to set.
487      */
488     private void setContextParmetersInParameterService(final ContextParameters contextParameters) {
489         ParameterService.register(contextParameters);
490         ParameterService.register(contextParameters.getDistributorParameters());
491         ParameterService.register(contextParameters.getLockManagerParameters());
492         ParameterService.register(contextParameters.getPersistorParameters());
493     }
494
495     /**
496      * Clear the context parameters in the parameter service.
497      *
498      * @param contextParameters The parameters to set.
499      */
500     private void clearContextParmetersInParameterService(final ContextParameters contextParameters) {
501         ParameterService.deregister(contextParameters.getPersistorParameters());
502         ParameterService.deregister(contextParameters.getLockManagerParameters());
503         ParameterService.deregister(contextParameters.getDistributorParameters());
504         ParameterService.deregister(contextParameters);
505
506     }
507 }