@Override public void start() { GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder(); // WFLY-6685 Prevent Infinispan from registering channel mbeans // The JGroups subsystem already does this builder.globalJmxStatistics().read(this.configuration.globalJmxStatistics()).disable(); // ISPN-4755 workaround TransportConfiguration transport = this.configuration.transport(); builder.transport() .clusterName(transport.clusterName()) .distributedSyncTimeout(transport.distributedSyncTimeout()) .initialClusterSize(transport.initialClusterSize()) .initialClusterTimeout(transport.initialClusterTimeout(), TimeUnit.MILLISECONDS) .machineId(transport.machineId()) .nodeName(transport.nodeName()) .rackId(transport.rackId()) .siteId(transport.siteId()) .transport(transport.transport()) .withProperties(transport.properties()) ; this.configuration = builder.build(); super.start(); }
@AfterClass(alwaysRun = true) protected void destroy() { if (cleanupAfterTest()) { TestingUtil.clearContent(cacheManagers); TestingUtil.killCacheManagers(cacheManagers); } for (EmbeddedCacheManager cm : cacheManagers) { String nodeName = cm.getCacheManagerConfiguration().transport().nodeName(); assertTrue("Invalid node name for test " + getCurrentTestShortName() + ": " + nodeName, nodeName != null && nodeName.contains(getCurrentTestShortName())); } cacheManagers.clear(); listeners.clear(); }
private JChannel createJGroupsChannel(GlobalConfiguration oldGC) { GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder().read(oldGC); TestCacheManagerFactory.amendTransport(builder); GlobalConfiguration gc = builder.build(); Properties p = gc.transport().properties(); String jgroupsCfg = p.getProperty(JGroupsTransport.CONFIGURATION_STRING); try { JChannel channel = new JChannel(new ByteArrayInputStream(jgroupsCfg.getBytes())); channel.setName(gc.transport().nodeName()); channel.connect(gc.transport().clusterName()); return channel; } catch (Exception e) { throw new CacheException(e); } } }
@Override public void start() { GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder(); // WFLY-6685 Prevent Infinispan from registering channel mbeans // The JGroups subsystem already does this builder.globalJmxStatistics().read(this.configuration.globalJmxStatistics()).disable(); // ISPN-4755 workaround TransportConfiguration transport = this.configuration.transport(); builder.transport() .clusterName(transport.clusterName()) .distributedSyncTimeout(transport.distributedSyncTimeout()) .initialClusterSize(transport.initialClusterSize()) .initialClusterTimeout(transport.initialClusterTimeout(), TimeUnit.MILLISECONDS) .machineId(transport.machineId()) .nodeName(transport.nodeName()) .rackId(transport.rackId()) .siteId(transport.siteId()) .transport(transport.transport()) .withProperties(transport.properties()) ; this.configuration = builder.build(); super.start(); }
assertEquals("Jalapeno", gc.transport().nodeName()); assertEquals(50000, gc.transport().distributedSyncTimeout());