Fullständig dokumentation för JPAStorageService finns här https://wiki.shibboleth.net/confluence/display/IDP30IDP4/StorageConfiguration#StorageConfiguration-JPAStorageService
- Ladda ner och lägg en av dessa drivers i "/opt/shibboleth-idp/edit-webapp/WEB-INF/lib/".
- HikariCP - httphttps://brettwooldridge.github.iocom/brettwooldridge/HikariCP/
- httphttps://search.maven.org/remotecontent?filepath=com/zaxxer/HikariCP/2.4.3/HikariCP-2.4.3.jarmvnrepository.com/artifact/com.zaxxer/HikariCP (version 3.4.5 är senaste vi har testat)
- Bonecp - http://www.jolbox.com/
- Tomcat-jdbc - http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
- http://apache.mirrors.spacedump.net/tomcat/tomcat-7/v7.0.68/bin/apache-tomcat-7.0.68.tar.gz
- Filen "apache-tomcat-7.0.68/lib/tomcat-jdbc.jar" behövs
- HikariCP - httphttps://brettwooldridge.github.iocom/brettwooldridge/HikariCP/
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="shibboleth.JPAStorageService" class="org.opensaml.storage.impl.JPAStorageService" p:cleanupInterval="%{idp.storage.cleanupInterval:PT10M}" c:factory-ref="shibboleth.JPAStorageService.EntityManagerFactory" /> <bean id="shibboleth.JPAStorageService.EntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="storageservice" /> <property name="packagesToScan" value="org.opensaml.storage.impl" /> <property name="dataSource" ref="shibboleth.JPAStorageService.DataSource" /> <property name="jpaVendorAdapter" ref="shibboleth.JPAStorageService.JPAVendorAdapter" /> <property name="jpaDialect"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /> </property> </bean> <bean id="shibboleth.JPAStorageService.JPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="MYSQL" /> </bean> <bean id="shibboleth.JPAStorageService.DataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close" lazy-init="true" p:driverClassName="com.mysql.jdbc.Driver" p:jdbcUrl="jdbc:mysql://127.0.0.1:3306/shibboleth?autoReconnect=true&localSocketAddress=127.0.0.1&connectTimeout=1800&initialTimeout=2&logSlowQueries=true&autoReconnectForPools=true" p:username="shibboleth" p:password="p@ssw0rd" /> |
...
- Skapa databastabell i MySQL
Code Block | ||||
---|---|---|---|---|
| ||||
CREATE TABLE `StorageRecords` ( `context` varchar(255) NOT NULL, `id` varchar(255) NOT NULL, `expires` bigint(20) DEFAULT NULL, `value` longtext NOT NULL, `version` bigint(20) NOT NULL, PRIMARY KEY (`context`,`id`), KEY `storagerecords_expires_index` (`expires`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; GRANT ALL PRIVILEGES ON `shibboleth`.`StorageRecords` TO 'shibboleth'@'localhost'; |
...
- Bygg om WAR-filen
Code Block |
---|
/opt/shibboleth-idp/bin/build.sh -Didp.target.dir=/opt/shibboleth-idp |
...