Add protected instance variable, optionally auto-wired with an object reference to the configured 'ClusteredSpringSessions' Region.

This commit is contained in:
John Blum
2018-12-03 18:34:40 -08:00
parent e48d34888e
commit 0369cb85e5

View File

@@ -30,6 +30,8 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.junit.Before;
import org.apache.geode.cache.DataPolicy;
@@ -44,6 +46,7 @@ import org.springframework.context.ApplicationListener;
import org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport;
import org.springframework.session.Session;
import org.springframework.session.SessionRepository;
import org.springframework.session.data.gemfire.config.annotation.web.http.GemFireHttpSessionConfiguration;
import org.springframework.session.data.gemfire.support.GemFireUtils;
import org.springframework.session.events.AbstractSessionEvent;
import org.springframework.util.StringUtils;
@@ -92,6 +95,9 @@ public abstract class AbstractGemFireIntegrationTests extends ForkingClientServe
@Autowired(required = false)
protected GemFireOperationsSessionRepository gemfireSessionRepository;
@Resource(name = GemFireHttpSessionConfiguration.DEFAULT_SESSION_REGION_NAME)
protected Region<Object, Session> sessions;
@Autowired(required = false)
protected SessionRepository<Session> sessionRepository;