Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 3.4.0対応

...

Panel
borderColorsilver
bgColorwhite
title$IDP_HOME$/conf/global.xml

<!-- Use this file to define any custom beans needed globally. -->
<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="packagesToScan" value="org.opensaml.storage.impl" />
     <property name="dataSource" ref="shibboleth.MySQLDataSource" />
     <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"
      p:database="MYSQL" />

<bean id="shibboleth.MySQLDataSource"
      class="org.apache.commons.dbcpdbcp2.BasicDataSource"
      p:driverClassName="com.mysql.jdbc.Driver"
      p:url="jdbc:mysql://localhost:3306/shibboleth"
      p:username="shibboleth"
      p:password="shibpassword"
      p:maxActivemaxTotal="10"
      p:maxIdle="5"
      p:maxWaitmaxWaitMillis="15000"
      p:testOnBorrow="true"
      p:validationQuery="select 1"
      p:validationQueryTimeout="5" />

Info

上記はCentOS 7(apache-commons-dbcpパッケージ)での設定例です。Tomcat 8以降をお使いの場合はclass属性を以下のようにしてください。

Panel

      class="org.apache.tomcat.dbcp.dbcp2.BasicDataSource"

また、p:maxActivep:maxTotal に、p:maxWaitp:maxWaitMillis に変更してください。

2.1.6. Tomcatの再起動

Tomcatを再起動します:

...