@Override protected RemoteCacheManager getRemoteCacheManager() { org.infinispan.client.hotrod.configuration.ConfigurationBuilder clientBuilder = new org.infinispan.client.hotrod.configuration.ConfigurationBuilder(); clientBuilder.addServer().host("127.0.0.1").port(hotrodServer.getPort()); clientBuilder.marshaller(new ProtoStreamMarshaller()); return new RemoteCacheManager(clientBuilder.build()); }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { cacheManager = TestCacheManagerFactory.createCacheManager(hotRodCacheConfiguration()); cache = cacheManager.getCache(); hotRodServer = HotRodClientTestingUtil.startHotRodServer(cacheManager); ConfigurationBuilder clientBuilder = new ConfigurationBuilder(); clientBuilder.addServer().host("127.0.0.1").port(hotRodServer.getPort()); clientBuilder.marshaller(new ProtoStreamMarshaller()); remoteCacheManager = new RemoteCacheManager(clientBuilder.build()); remoteCache = remoteCacheManager.getCache(); // initialize client-side serialization context MarshallerRegistration.registerMarshallers( ProtoStreamMarshaller.getSerializationContext(remoteCacheManager)); return cacheManager; }