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