Fixes GH PR #148 and PR #308 implementing a GemFire Adapter to support clustered HttpSessions in Spring Session. * Resolve SGF-373 - Implement a Spring Session Adapter for GemFire backing a HttpSession similar to the Redis support. * Add Spring Session annotation to enable GemFire support with @EnableGemFireHttpSession. * Add extesion of SpringHttpSessionConfiguration to configure GemFire using GemFireHttpSessionConfiguration. * Add implementation of SessionRepository to access clustered, replicated HttpSession state in GemFire with GemFireOperationsSessionRepository. * Utilize GemFire Data Serialization framework to both replicate HttpSession state information as well as handle deltas. * Utilize GemFire OQL query to lookup arbitrary Session attributes by name, and in particular the user authenticated principal name. * Implment unit and integration tests, and in particular, tests for both peer-to-peer (p2p) and client/server topologies. * Set initial Spring Data GemFire version to 1.7.2.RELEASE, which depends on Pivotal GemFire 8.1.0. * Add documentation, Javadoc and samples along with additional Integration Tests. Fixes gh-148
66 lines
1.5 KiB
Groovy
66 lines
1.5 KiB
Groovy
apply from: JAVA_GRADLE
|
|
apply from: TOMCAT_7_GRADLE
|
|
apply plugin: "application"
|
|
|
|
tasks.findByPath("artifactoryPublish")?.enabled = false
|
|
|
|
sonarRunner {
|
|
skipProject = true
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':spring-session-data-gemfire'),
|
|
"org.springframework:spring-web:$springVersion",
|
|
jstlDependencies
|
|
|
|
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
|
|
|
testCompile "junit:junit:$junitVersion"
|
|
|
|
integrationTestCompile gebDependencies
|
|
|
|
integrationTestRuntime "org.springframework.shell:spring-shell:1.0.0.RELEASE"
|
|
}
|
|
|
|
mainClassName = 'sample.Application'
|
|
|
|
def port
|
|
def process
|
|
|
|
task availablePort() << {
|
|
def serverSocket = new ServerSocket(0)
|
|
port = serverSocket.localPort
|
|
serverSocket.close()
|
|
}
|
|
|
|
task runGemFireServer(dependsOn: availablePort) << {
|
|
println 'STARTING GEMFIRE SERVER...'
|
|
|
|
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
|
|
|
|
String[] commandLine = ['java', '-server', '-ea',
|
|
"-Dspring.session.data.gemfire.port=$port",
|
|
"-Dsample.httpsession.gemfire.log-level="
|
|
+ System.getProperty('sample.httpsession.gemfire.log-level', 'warning'),
|
|
'-classpath', classpath, 'sample.Application' ]
|
|
|
|
//println commandLine
|
|
|
|
process = commandLine.execute()
|
|
process.in.close()
|
|
process.out.close()
|
|
process.err.close()
|
|
}
|
|
|
|
integrationTest.doLast {
|
|
println 'STOPPING GEMFIRE SERVER...'
|
|
process?.destroyForcibly()
|
|
}
|
|
|
|
integrationTomcatRun {
|
|
dependsOn runGemFireServer
|
|
doFirst {
|
|
System.setProperty("spring.session.data.gemfire.port", "$port");
|
|
}
|
|
}
|