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