[jboss-cvs] JBossAS SVN: r107126 - in projects/cluster/ha-server-cache-ispn/trunk/src: test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 27 21:30:46 EDT 2010
Author: pferraro
Date: 2010-07-27 21:30:45 -0400 (Tue, 27 Jul 2010)
New Revision: 107126
Modified:
projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java
projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java
projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryTest.java
projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java
Log:
Make DistributedCacheManager unaware of CacheContainerRegistry source.
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java 2010-07-28 01:24:33 UTC (rev 107125)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java 2010-07-28 01:30:45 UTC (rev 107126)
@@ -21,6 +21,7 @@
*/
package org.jboss.ha.web.tomcat.service.session.distributedcache.impl;
+import org.jboss.ha.ispn.DefaultCacheContainerRegistry;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory;
import org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager;
@@ -54,6 +55,6 @@
SessionAttributeMarshaller marshaller = this.marshallerFactory.createMarshaller(manager);
SessionAttributeStorage<T> storage = this.storageFactory.createStorage(manager.getReplicationConfig().getReplicationGranularity(), marshaller);
- return new DistributedCacheManagerImpl<T>(manager, storage, this.invoker);
+ return new DistributedCacheManagerImpl<T>(manager, DefaultCacheContainerRegistry.getInstance(), storage, this.invoker);
}
}
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java 2010-07-28 01:24:33 UTC (rev 107125)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java 2010-07-28 01:30:45 UTC (rev 107126)
@@ -44,7 +44,6 @@
import org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent;
import org.infinispan.transaction.tm.BatchModeTransactionManager;
import org.jboss.ha.ispn.CacheContainerRegistry;
-import org.jboss.ha.ispn.DefaultCacheContainerRegistry;
import org.jboss.logging.Logger;
import org.jboss.web.tomcat.service.session.distributedcache.spi.BatchingManager;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata;
@@ -84,14 +83,16 @@
private final LocalDistributableSessionManager manager;
private final SessionAttributeStorage<T> attributeStorage;
private final CacheInvoker invoker;
+ private final CacheContainerRegistry registry;
private Cache<String, AtomicMap<Object, Object>> cache;
private BatchingManager batchingManager;
private boolean passivationEnabled = false;
- public DistributedCacheManagerImpl(LocalDistributableSessionManager manager, SessionAttributeStorage<T> attributeStorage, CacheInvoker invoker)
+ public DistributedCacheManagerImpl(LocalDistributableSessionManager manager, CacheContainerRegistry registry, SessionAttributeStorage<T> attributeStorage, CacheInvoker invoker)
{
this.manager = manager;
+ this.registry = registry;
this.attributeStorage = attributeStorage;
this.invoker = invoker;
}
@@ -114,8 +115,7 @@
}
}
- CacheContainerRegistry registry = DefaultCacheContainerRegistry.getInstance();
- CacheContainer container = registry.getCacheContainer(containerName);
+ CacheContainer container = this.registry.getCacheContainer(containerName);
String hostName = this.manager.getHostName();
String host = (hostName == null) || hostName.isEmpty() ? "localhost" : hostName;
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryTest.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryTest.java 2010-07-28 01:24:33 UTC (rev 107125)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryTest.java 2010-07-28 01:30:45 UTC (rev 107126)
@@ -21,11 +21,21 @@
*/
package org.jboss.ha.web.tomcat.service.session.distributedcache.impl;
+import java.util.Collections;
+
+import javax.naming.Context;
+
import org.easymock.EasyMock;
+import org.infinispan.config.InfinispanConfiguration;
import org.infinispan.manager.CacheContainer;
+import org.jboss.ha.ispn.CacheContainerConfiguration;
+import org.jboss.ha.ispn.CacheContainerFactory;
+import org.jboss.ha.ispn.DefaultCacheContainerRegistry;
+import org.jboss.ha.ispn.config.CacheContainerRegistryConfiguration;
+import org.jboss.ha.ispn.config.CacheContainerRegistryConfigurationEntry;
+import org.jboss.ha.ispn.config.CacheContainerRegistryConfigurationSource;
import org.jboss.metadata.web.jboss.ReplicationConfig;
import org.jboss.metadata.web.jboss.ReplicationGranularity;
-import org.jboss.web.tomcat.service.session.distributedcache.spi.ClusteringNotSupportedException;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory;
import org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager;
@@ -39,37 +49,97 @@
*/
public class DistributedCacheManagerFactoryTest
{
- private SessionAttributeStorageFactory storageFactory = EasyMock.createStrictMock(SessionAttributeStorageFactory.class);
- private SessionAttributeMarshallerFactory marshallerFactory = EasyMock.createStrictMock(SessionAttributeMarshallerFactory.class);
- private CacheInvoker invoker = EasyMock.createStrictMock(CacheInvoker.class);
- private LocalDistributableSessionManager manager = EasyMock.createStrictMock(LocalDistributableSessionManager.class);
- private CacheContainer container = EasyMock.createStrictMock(CacheContainer.class);
+ private final SessionAttributeStorageFactory storageFactory = EasyMock.createStrictMock(SessionAttributeStorageFactory.class);
+ private final SessionAttributeMarshallerFactory marshallerFactory = EasyMock.createStrictMock(SessionAttributeMarshallerFactory.class);
+ private final CacheInvoker invoker = EasyMock.createStrictMock(CacheInvoker.class);
+ private final LocalDistributableSessionManager manager = EasyMock.createStrictMock(LocalDistributableSessionManager.class);
@SuppressWarnings("unchecked")
- private SessionAttributeStorage<OutgoingDistributableSessionData> storage = EasyMock.createStrictMock(SessionAttributeStorage.class);
- private SessionAttributeMarshaller marshaller = EasyMock.createStrictMock(SessionAttributeMarshaller.class);
+ private final SessionAttributeStorage<OutgoingDistributableSessionData> storage = EasyMock.createStrictMock(SessionAttributeStorage.class);
+ private final SessionAttributeMarshaller marshaller = EasyMock.createStrictMock(SessionAttributeMarshaller.class);
@Test
- public void testDefaultCacheContainer() throws ClusteringNotSupportedException
+ public void test() throws Exception
{
- DistributedCacheManagerFactory factory = new DistributedCacheManagerFactoryImpl(this.storageFactory, this.marshallerFactory, this.invoker);
+ CacheContainerFactory containerFactory = EasyMock.createStrictMock(CacheContainerFactory.class);
+ CacheContainerRegistryConfigurationSource source = EasyMock.createStrictMock(CacheContainerRegistryConfigurationSource.class);
+ Context context = EasyMock.createNiceMock(Context.class);
+ CacheContainer container = EasyMock.createStrictMock(CacheContainer.class);
- ReplicationConfig config = new ReplicationConfig();
- ReplicationGranularity granularity = ReplicationGranularity.SESSION;
- config.setReplicationGranularity(granularity);
+ // First need to populate registry
+ DefaultCacheContainerRegistry registry = new DefaultCacheContainerRegistry(containerFactory, source, context);
- EasyMock.expect(this.marshallerFactory.createMarshaller(this.manager)).andReturn(this.marshaller);
- EasyMock.expect(this.manager.getReplicationConfig()).andReturn(config);
- EasyMock.expect(this.storageFactory.createStorage(granularity, this.marshaller)).andReturn(this.storage);
+ InfinispanConfiguration infinispanConfig = InfinispanConfiguration.newInfinispanConfiguration("config-samples/minimal.xml");
+ CacheContainerRegistryConfigurationEntry entry = new CacheContainerRegistryConfigurationEntry();
+ entry.setId("default");
+ entry.setConfiguration(infinispanConfig);
+ CacheContainerRegistryConfiguration registryConfig = new CacheContainerRegistryConfiguration();
+ registryConfig.setEntries(Collections.singletonList(entry));
- EasyMock.replay(this.storageFactory, this.marshallerFactory, this.invoker, this.manager, this.container, this.storage, this.marshaller);
+ EasyMock.expect(source.getRegistryConfiguration()).andReturn(registryConfig);
- DistributedCacheManager<?> result = factory.getDistributedCacheManager(this.manager);
+ EasyMock.expect(containerFactory.createCacheContainer(EasyMock.isA(CacheContainerConfiguration.class), EasyMock.eq(Collections.<String, String>emptyMap()))).andReturn(container);
+ EasyMock.expect(context.composeName("default", "java:CacheManager")).andReturn("java:CacheManager/default");
- EasyMock.verify(this.storageFactory, this.marshallerFactory, this.invoker, this.manager, this.container, this.storage, this.marshaller);
+ context.bind("java:CacheManager/default", container);
- Assert.assertNotNull(result);
- Assert.assertTrue(result instanceof DistributedCacheManagerImpl);
+ EasyMock.replay(containerFactory, source, context, container);
- EasyMock.reset(this.storageFactory, this.marshallerFactory, this.invoker, this.manager, this.container, this.storage, this.marshaller);
+ registry.start();
+
+ EasyMock.verify(containerFactory, source, context, container);
+
+ // Verify that a static registry exists
+ Assert.assertNotNull(DefaultCacheContainerRegistry.getInstance());
+
+ EasyMock.reset(containerFactory, source, context, container);
+
+ try
+ {
+ DistributedCacheManagerFactory factory = new DistributedCacheManagerFactoryImpl(this.storageFactory, this.marshallerFactory, this.invoker);
+
+ ReplicationConfig config = new ReplicationConfig();
+ ReplicationGranularity granularity = ReplicationGranularity.SESSION;
+ config.setReplicationGranularity(granularity);
+
+ EasyMock.expect(this.marshallerFactory.createMarshaller(this.manager)).andReturn(this.marshaller);
+ EasyMock.expect(this.manager.getReplicationConfig()).andReturn(config);
+ EasyMock.expect(this.storageFactory.createStorage(granularity, this.marshaller)).andReturn(this.storage);
+
+ EasyMock.replay(this.storageFactory, this.marshallerFactory, this.invoker, this.manager, this.storage, this.marshaller);
+
+ DistributedCacheManager<?> result = factory.getDistributedCacheManager(this.manager);
+
+ EasyMock.verify(this.storageFactory, this.marshallerFactory, this.invoker, this.manager, this.storage, this.marshaller);
+
+ Assert.assertNotNull(result);
+ Assert.assertTrue(result instanceof DistributedCacheManagerImpl);
+
+ EasyMock.reset(this.storageFactory, this.marshallerFactory, this.invoker, this.manager, this.storage, this.marshaller);
+ }
+ finally
+ {
+ container.stop();
+ context.unbind("java:CacheManager/default");
+
+ EasyMock.replay(containerFactory, source, context, container);
+
+ registry.stop();
+
+ EasyMock.verify(containerFactory, source, context, container);
+
+ IllegalStateException exception = null;
+ try
+ {
+ DefaultCacheContainerRegistry.getInstance();
+ }
+ catch (IllegalStateException e)
+ {
+ exception = e;
+ }
+
+ Assert.assertNotNull(exception);
+
+ EasyMock.reset(containerFactory, source, context, container);
+ }
}
}
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java 2010-07-28 01:24:33 UTC (rev 107125)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java 2010-07-28 01:30:45 UTC (rev 107126)
@@ -21,21 +21,15 @@
*/
package org.jboss.ha.web.tomcat.service.session.distributedcache.impl;
-import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
-import javax.naming.Context;
-
-import junit.framework.Assert;
-
import org.easymock.Capture;
import org.easymock.EasyMock;
import org.infinispan.AdvancedCache;
import org.infinispan.Cache;
import org.infinispan.atomic.AtomicMap;
import org.infinispan.config.Configuration;
-import org.infinispan.config.InfinispanConfiguration;
import org.infinispan.context.Flag;
import org.infinispan.lifecycle.ComponentStatus;
import org.infinispan.manager.CacheContainer;
@@ -44,12 +38,7 @@
import org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent;
import org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent;
import org.infinispan.transaction.tm.BatchModeTransactionManager;
-import org.jboss.ha.ispn.CacheContainerConfiguration;
-import org.jboss.ha.ispn.CacheContainerFactory;
-import org.jboss.ha.ispn.DefaultCacheContainerRegistry;
-import org.jboss.ha.ispn.config.CacheContainerRegistryConfiguration;
-import org.jboss.ha.ispn.config.CacheContainerRegistryConfigurationEntry;
-import org.jboss.ha.ispn.config.CacheContainerRegistryConfigurationSource;
+import org.jboss.ha.ispn.CacheContainerRegistry;
import org.jboss.metadata.web.jboss.ReplicationConfig;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager;
@@ -57,8 +46,7 @@
import org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager;
import org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData;
import org.jboss.web.tomcat.service.session.distributedcache.spi.SessionOwnershipSupport;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.Assert;
import org.junit.Test;
/**
@@ -67,78 +55,15 @@
*/
public class DistributedCacheManagerTest
{
- private final CacheContainerFactory factory = EasyMock.createStrictMock(CacheContainerFactory.class);
- private final CacheContainerRegistryConfigurationSource source = EasyMock.createStrictMock(CacheContainerRegistryConfigurationSource.class);
- private final CacheContainer defaultContainer = EasyMock.createStrictMock(CacheContainer.class);
- private final CacheContainer customContainer = EasyMock.createStrictMock(CacheContainer.class);
- private final Context context = EasyMock.createNiceMock(Context.class);
-
- private DefaultCacheContainerRegistry registry;
-
+ private final CacheContainer container = EasyMock.createStrictMock(CacheContainer.class);
+ private final CacheContainerRegistry registry = EasyMock.createStrictMock(CacheContainerRegistry.class);
private final LocalDistributableSessionManager manager = EasyMock.createStrictMock(LocalDistributableSessionManager.class);
@SuppressWarnings("unchecked")
private final SessionAttributeStorage<OutgoingDistributableSessionData> storage = EasyMock.createStrictMock(SessionAttributeStorage.class);
@SuppressWarnings("unchecked")
private final AdvancedCache<String, AtomicMap<Object, Object>> cache = EasyMock.createStrictMock(AdvancedCache.class);
private final CacheInvoker invoker = EasyMock.createStrictMock(CacheInvoker.class);
-
- @Before
- public void init() throws Exception
- {
- InfinispanConfiguration config = InfinispanConfiguration.newInfinispanConfiguration("config-samples/minimal.xml");
-
- CacheContainerRegistryConfigurationEntry entry1 = new CacheContainerRegistryConfigurationEntry();
-
- entry1.setId("default");
- entry1.setConfiguration(config);
-
- CacheContainerRegistryConfigurationEntry entry2 = new CacheContainerRegistryConfigurationEntry();
-
- entry2.setId("custom");
- entry2.setConfiguration(config);
-
- CacheContainerRegistryConfiguration registryConfig = new CacheContainerRegistryConfiguration();
- registryConfig.setEntries(Arrays.asList(entry1, entry2));
-
- this.registry = new DefaultCacheContainerRegistry(this.factory, this.source, this.context);
-
- EasyMock.expect(this.source.getRegistryConfiguration()).andReturn(registryConfig);
-
- EasyMock.expect(this.factory.createCacheContainer(EasyMock.isA(CacheContainerConfiguration.class), EasyMock.eq(Collections.<String, String>emptyMap()))).andReturn(this.defaultContainer);
- EasyMock.expect(this.context.composeName("default", "java:CacheManager")).andReturn("java:CacheManager/default");
-
- this.context.bind("java:CacheManager/default", this.defaultContainer);
-
- EasyMock.expect(this.factory.createCacheContainer(EasyMock.isA(CacheContainerConfiguration.class), EasyMock.eq(Collections.<String, String>emptyMap()))).andReturn(this.customContainer);
- EasyMock.expect(this.context.composeName("custom", "java:CacheManager")).andReturn("java:CacheManager/custom");
-
- this.context.bind("java:CacheManager/custom", this.customContainer);
-
- EasyMock.replay(this.factory, this.source, this.context, this.defaultContainer);
-
- this.registry.start();
-
- EasyMock.verify(this.factory, this.source, this.context, this.defaultContainer);
- EasyMock.reset(this.factory, this.source, this.context, this.defaultContainer);
- }
- @After
- public void cleanup() throws Exception
- {
- this.defaultContainer.stop();
- this.context.unbind("java:CacheManager/default");
-
- this.customContainer.stop();
- this.context.unbind("java:CacheManager/custom");
-
- EasyMock.replay(this.factory, this.source, this.context, this.defaultContainer);
-
- this.registry.stop();
-
- EasyMock.verify(this.factory, this.source, this.context, this.defaultContainer);
- EasyMock.reset(this.factory, this.source, this.context, this.defaultContainer);
- }
-
@Test
public void start()
{
@@ -146,36 +71,30 @@
config.setCacheName("session-cache");
// Validate host contribution to cache name
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
- this.start("session-cache", "", "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
- this.start("session-cache", "host1", "", "host1/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
+ this.start(null, "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration());
+ this.start(null, "session-cache", "", "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration());
+ this.start(null, "session-cache", "host1", "", "host1/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration());
// Validate context path contribution to cache name
- this.start("session-cache", null, "/", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
- this.start("session-cache", null, "/context1", "localhost/context1", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
- this.start("session-cache", null, "/path/context1", "localhost/path/context1", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
+ this.start(null, "session-cache", null, "/", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration());
+ this.start(null, "session-cache", null, "/context1", "localhost/context1", config, ComponentStatus.INSTANTIATED, true, new Configuration());
+ this.start(null, "session-cache", null, "/path/context1", "localhost/path/context1", config, ComponentStatus.INSTANTIATED, true, new Configuration());
// Validate starting of cache per cache status
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.FAILED, true, new Configuration(), this.defaultContainer);
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INITIALIZING, true, new Configuration(), this.defaultContainer);
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.RUNNING, false, new Configuration(), this.defaultContainer);
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.STOPPING, true, new Configuration(), this.defaultContainer);
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.TERMINATED, true, new Configuration(), this.defaultContainer);
+ this.start(null, "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.FAILED, true, new Configuration());
+ this.start(null, "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INITIALIZING, true, new Configuration());
+ this.start(null, "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.RUNNING, false, new Configuration());
+ this.start(null, "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.STOPPING, true, new Configuration());
+ this.start(null, "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.TERMINATED, true, new Configuration());
// Validate cache container qualified cache name
config.setCacheName("default:session-cache");
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
-
- config.setCacheName("dummy:session-cache");
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
-
- config.setCacheName("custom:session-cache");
- this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.customContainer);
+ this.start("default", "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration());
}
- private DistributedCacheManagerImpl<OutgoingDistributableSessionData> start(String templateCacheName, String hostName, String contextName, String cacheName, ReplicationConfig config, ComponentStatus cacheStatus, boolean startCache, Configuration configuration, CacheContainer container)
+ private DistributedCacheManagerImpl<OutgoingDistributableSessionData> start(String containerName, String templateCacheName, String hostName, String contextName, String cacheName, ReplicationConfig config, ComponentStatus cacheStatus, boolean startCache, Configuration configuration)
{
- DistributedCacheManagerImpl<OutgoingDistributableSessionData> manager = new DistributedCacheManagerImpl<OutgoingDistributableSessionData>(this.manager, this.storage, this.invoker);
+ DistributedCacheManagerImpl<OutgoingDistributableSessionData> manager = new DistributedCacheManagerImpl<OutgoingDistributableSessionData>(this.manager, this.registry, this.storage, this.invoker);
@SuppressWarnings("unchecked")
Cache<Object, Object> cache = EasyMock.createStrictMock(Cache.class);
@@ -183,9 +102,10 @@
EasyMock.expect(this.manager.getReplicationConfig()).andReturn(config);
+ EasyMock.expect(this.registry.getCacheContainer(containerName)).andReturn(this.container);
EasyMock.expect(this.manager.getHostName()).andReturn(hostName);
EasyMock.expect(this.manager.getContextName()).andReturn(contextName);
- EasyMock.expect(container.getCache()).andReturn(cache);
+ EasyMock.expect(this.container.getCache()).andReturn(cache);
EasyMock.expect(cache.getCacheManager()).andReturn(cacheManager);
EasyMock.expect(cacheManager.defineConfiguration(cacheName, templateCacheName, new Configuration())).andReturn(configuration);
EasyMock.expect(cacheManager.<String, AtomicMap<Object, Object>>getCache(cacheName)).andReturn(this.cache);
@@ -201,15 +121,15 @@
EasyMock.expect(this.cache.getConfiguration()).andReturn(configuration);
- EasyMock.replay(this.manager, container, this.storage, this.cache, this.invoker, cache, cacheManager);
+ EasyMock.replay(this.registry, this.manager, this.container, this.storage, this.cache, this.invoker, cache, cacheManager);
manager.start();
- EasyMock.verify(this.manager, container, this.storage, this.cache, this.invoker, cache, cacheManager);
+ EasyMock.verify(this.registry, this.manager, this.container, this.storage, this.cache, this.invoker, cache, cacheManager);
Assert.assertNotNull(manager.getBatchingManager());
- EasyMock.reset(this.manager, container, this.storage, this.cache, this.invoker, cache, cacheManager);
+ EasyMock.reset(this.registry, this.manager, this.container, this.storage, this.cache, this.invoker, cache, cacheManager);
return manager;
}
@@ -219,7 +139,7 @@
ReplicationConfig config = new ReplicationConfig();
config.setCacheName("session-cache");
- return this.start("session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration(), this.defaultContainer);
+ return this.start(null, "session-cache", null, "", "localhost/ROOT", config, ComponentStatus.INSTANTIATED, true, new Configuration());
}
@Test
@@ -230,12 +150,12 @@
this.cache.removeListener(manager);
this.cache.stop();
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.stop();
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -243,12 +163,12 @@
{
DistributedCacheManager<OutgoingDistributableSessionData> manager = this.startDistributedCacheManager();
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.sessionCreated("abc");
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -274,11 +194,11 @@
EasyMock.expect(this.invoker.invoke(EasyMock.same(this.cache), EasyMock.capture(capturedOperation))).andReturn(null);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, data);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, data);
manager.storeSessionData(data);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, data);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, data);
AtomicMap<Object, Object> map = capturedMap.getValue();
@@ -287,7 +207,7 @@
Assert.assertEquals(timestamp, map.get(Byte.valueOf((byte) AtomicMapEntry.TIMESTAMP.ordinal())));
Assert.assertSame(metadata, map.get(Byte.valueOf((byte) AtomicMapEntry.METADATA.ordinal())));
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, data);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, data);
CacheInvoker.Operation<AtomicMap<Object, Object>> operation = capturedOperation.getValue();
@@ -296,15 +216,15 @@
EasyMock.expect(this.cache.put(EasyMock.same(sessionId), EasyMock.same(map))).andReturn(oldMap);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, data);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, data);
AtomicMap<Object, Object> result = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, data);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, data);
Assert.assertSame(oldMap, result);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, data);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, data);
}
@Test
@@ -341,11 +261,11 @@
EasyMock.expect(this.storage.load(map)).andReturn(attributes);
}
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, map);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, map);
IncomingDistributableSessionData result = manager.getSessionData(sessionId, null, includeAttributes);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, map);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, map);
Assert.assertNotNull(result);
Assert.assertEquals(version.intValue(), result.getVersion());
@@ -374,7 +294,7 @@
Assert.assertNotNull(exception);
}
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, map);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, map);
CacheInvoker.Operation<AtomicMap<Object, Object>> operation = capturedOperation.getValue();
@@ -383,15 +303,15 @@
EasyMock.expect(this.cache.get(EasyMock.same(sessionId))).andReturn(expectedMap);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, expectedMap);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, expectedMap);
AtomicMap<Object, Object> resultMap = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, expectedMap);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, expectedMap);
Assert.assertSame(expectedMap, resultMap);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, expectedMap);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, expectedMap);
}
@Test
@@ -410,15 +330,15 @@
EasyMock.expect(this.invoker.invoke(EasyMock.same(this.cache), EasyMock.capture(capturedOperation))).andReturn(null);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
IncomingDistributableSessionData result = manager.getSessionData("abc", null, includeAttributes);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertNull(result);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
CacheInvoker.Operation<AtomicMap<Object, Object>> operation = capturedOperation.getValue();
@@ -427,15 +347,15 @@
EasyMock.expect(this.cache.get("abc")).andReturn(expectedMap);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
AtomicMap<Object, Object> resultMap = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertSame(expectedMap, resultMap);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -450,15 +370,15 @@
{
DistributedCacheManager<OutgoingDistributableSessionData> manager = this.startDistributedCacheManager();
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
IncomingDistributableSessionData result = manager.getSessionData("abc", "owner1", includeAttributes);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertNull(result);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -472,12 +392,12 @@
EasyMock.expect(this.invoker.invoke(EasyMock.same(this.cache), EasyMock.capture(capturedOperation))).andReturn(null);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.removeSession(sessionId);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
CacheInvoker.Operation<AtomicMap<Object, Object>> operation = capturedOperation.getValue();
@@ -486,15 +406,15 @@
EasyMock.expect(this.cache.remove(sessionId)).andReturn(expectedMap);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
AtomicMap<Object, Object> resultMap = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertSame(expectedMap, resultMap);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -508,12 +428,12 @@
EasyMock.expect(this.invoker.invoke(EasyMock.same(this.cache), EasyMock.capture(capturedOperation))).andReturn(null);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.removeSessionLocal(sessionId);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
CacheInvoker.Operation<AtomicMap<Object, Object>> operation = capturedOperation.getValue();
@@ -524,15 +444,15 @@
EasyMock.expect(this.cache.withFlags(Flag.CACHE_MODE_LOCAL)).andReturn(this.cache);
EasyMock.expect(this.cache.remove(sessionId)).andReturn(expectedMap);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
AtomicMap<Object, Object> resultMap = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertSame(expectedMap, resultMap);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -546,12 +466,12 @@
EasyMock.expect(this.invoker.invoke(EasyMock.same(this.cache), EasyMock.capture(capturedOperation))).andReturn(null);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.removeSessionLocal(sessionId, null);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
CacheInvoker.Operation<AtomicMap<Object, Object>> operation = capturedOperation.getValue();
@@ -562,15 +482,15 @@
EasyMock.expect(this.cache.withFlags(Flag.CACHE_MODE_LOCAL)).andReturn(this.cache);
EasyMock.expect(this.cache.remove(sessionId)).andReturn(expectedMap);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
AtomicMap<Object, Object> resultMap = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertSame(expectedMap, resultMap);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -578,12 +498,12 @@
{
DistributedCacheManager<OutgoingDistributableSessionData> manager = this.startDistributedCacheManager();
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.removeSessionLocal("abc", "owner1");
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -597,27 +517,27 @@
EasyMock.expect(this.invoker.invoke(EasyMock.same(this.cache), EasyMock.capture(capturedOperation))).andReturn(null);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.evictSession(sessionId);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
CacheInvoker.Operation<Void> operation = capturedOperation.getValue();
this.cache.evict(sessionId);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
Void result = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertNull(result);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -631,27 +551,27 @@
EasyMock.expect(this.invoker.invoke(EasyMock.same(this.cache), EasyMock.capture(capturedOperation))).andReturn(null);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.evictSession(sessionId, null);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
CacheInvoker.Operation<Void> operation = capturedOperation.getValue();
this.cache.evict(sessionId);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
Void result = operation.invoke(this.cache);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertNull(result);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -659,12 +579,12 @@
{
DistributedCacheManager<OutgoingDistributableSessionData> manager = this.startDistributedCacheManager();
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.evictSession("abc", "owner1");
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -674,18 +594,18 @@
EasyMock.expect(this.cache.keySet()).andReturn(Collections.singleton("abc"));
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
Map<String, String> result = manager.getSessionIds();
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
Assert.assertNotNull(result);
Assert.assertEquals(1, result.size());
Assert.assertTrue(result.containsKey("abc"));
Assert.assertNull(result.get("abc"));
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -701,12 +621,12 @@
this.invoker.setForceSynchronous(forceSynchronous);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
manager.setForceSynchronous(forceSynchronous);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -714,17 +634,17 @@
{
DistributedCacheManager<OutgoingDistributableSessionData> manager = this.startDistributedCacheManager();
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker);
SessionOwnershipSupport support = manager.getSessionOwnershipSupport();
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker);
// TODO when session ownership support is added, replace these assertions
Assert.assertNull(support);
// Assert.assertSame(manager, support);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker);
}
@Test
@@ -737,23 +657,23 @@
EasyMock.expect(event.isPre()).andReturn(true);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.removed(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
EasyMock.expect(event.isPre()).andReturn(false);
EasyMock.expect(event.isOriginLocal()).andReturn(true);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.removed(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
EasyMock.expect(event.isPre()).andReturn(false);
@@ -762,12 +682,12 @@
this.manager.notifyRemoteInvalidation("abc");
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.removed(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
}
@Test
@@ -780,23 +700,23 @@
EasyMock.expect(event.isPre()).andReturn(true);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.modified(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
EasyMock.expect(event.isPre()).andReturn(false);
EasyMock.expect(event.isOriginLocal()).andReturn(true);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.modified(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
@SuppressWarnings("unchecked")
@@ -817,12 +737,12 @@
EasyMock.expect(this.manager.sessionChangedInDistributedCache("abc", null, version.intValue(), timestamp.longValue(), metadata)).andReturn(false);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event, map);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event, map);
manager.modified(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event, map);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event, map);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event, map);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event, map);
}
@Test
@@ -834,32 +754,32 @@
EasyMock.expect(event.isPre()).andReturn(true);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.activated(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
EasyMock.expect(this.manager.isPassivationEnabled()).andReturn(false);
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.activated(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
EasyMock.expect(this.manager.isPassivationEnabled()).andReturn(true);
this.manager.sessionActivated();
- EasyMock.replay(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
manager.activated(event);
- EasyMock.verify(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
- EasyMock.reset(this.manager, this.defaultContainer, this.storage, this.cache, this.invoker, event);
+ EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+ EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
}
}
More information about the jboss-cvs-commits
mailing list