We need to config JPA ticket registry when we use Apereo CAS and config in HA environment. Otherwise we login from different client app will get different ticket and will show login form many times. Today I make a sample to tell you how to config it. It tested on version 5.1.4.
First, make sure your properties file (application.properties) have follow configuration.
# JPA Ticket Registry
cas.ticket.registry.jpa.ticketLockType=NONE
cas.ticket.registry.jpa.jpaLockingTimeout=3600
cas.ticket.registry.jpa.isolateInternalQueries=false
cas.ticket.registry.jpa.failFast=true
cas.ticket.registry.jpa.dialect=org.hibernate.dialect.MySQL57InnoDBDialect
cas.ticket.registry.jpa.leakThreshold=10
cas.ticket.registry.jpa.jpaLockingTgtEnabled=false
cas.ticket.registry.jpa.batchSize=1
cas.ticket.registry.jpa.defaultSchema=cas
cas.ticket.registry.jpa.ddlAuto=create-drop
cas.ticket.registry.jpa.idleTimeout=5000
# The JNDI data source account must grant create and delete table right
cas.ticket.registry.jpa.dataSourceName=java:/CASXADS
cas.ticket.registry.jpa.dataSourceProxy=true
cas.ticket.registry.jpa.pool.suspension=false
cas.ticket.registry.jpa.pool.minSize=6
cas.ticket.registry.jpa.pool.maxSize=18
cas.ticket.registry.jpa.pool.maxWait=2000
Second, make sure your pom.xml file have follow configuration.
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-jpa-ticket-registry</artifactId>
<version>${cas.version}</version>
</dependency>
|