All Downloads are FREE. Search and download functionalities are using the official Maven repository.

config.infinispan.jdbc-mysql.infinispan.xml Maven / Gradle / Ivy

Go to download

The Fedora Commons repository configurations module: Provides configuration resources that are used in integration testing and deployments.

There is a newer version: 6.5.1
Show newest version
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="urn:infinispan:config:7.2"
            xmlns:jdbc="urn:infinispan:config:store:jdbc:7.2"
            xsi:schemaLocation="urn:infinispan:config:7.2 http://www.infinispan.org/schemas/infinispan-config-7.2.xsd urn:infinispan:config:store:jdbc:7.2 http://infinispan.org/schemas/infinispan-cachestore-jdbc-config-7.2.xsd">

  <cache-container default-cache="FedoraRepository">

    <jmx duplicate-domains="true"/>

    <local-cache name="FedoraRepository" statistics="true">

      <transaction transaction-manager-lookup="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
                   mode="NON_XA"
                   locking="PESSIMISTIC"/>

      <eviction max-entries="500" strategy="LIRS" thread-policy="DEFAULT"/>

      <!--
          Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
          data to be persisted, not just what doesn't fit into memory. Shared is false because there
          are no other caches sharing this jdbc store. We set preload to false for lazy loading;
          may be improved by preloading and configuring eviction.

          We can have multiple cache loaders, which get chained. But we'll define just one.

          See: https://docs.jboss.org/infinispan/7.2/configdocs/infinispan-cachestore-jdbc-config-7.2.html
       -->
      <persistence passivation="false">
        <jdbc:string-keyed-jdbc-store shared="false"
                                 preload="false"
                                 fetch-state="true"
                                 read-only="false"
                                 purge="false">
          <!-- JDNI datasource:
            <jdbc:data-source jndi-url="jndi:jdbc/ispn"/>
          -->
          <!-- custom database connection pool -->
          <jdbc:connection-pool connection-url="jdbc:mysql://${fcrepo.ispn.mysql.host:localhost}:${fcrepo.ispn.mysql.port:3306}/ispn?createDatabaseIfNotExist=true"
                                driver="com.mysql.jdbc.Driver"
                                username="${fcrepo.ispn.mysql.username}"
                                password="${fcrepo.ispn.mysql.password}"/>
          <jdbc:string-keyed-table prefix="ispn_entry"
                                   create-on-start="true"
                                   drop-on-exit="false">
            <jdbc:id-column name="id" type="VARCHAR(255)"/>
            <jdbc:data-column name="datum" type="LONGBLOB"/>
            <jdbc:timestamp-column name="version" type="BIGINT"/>
          </jdbc:string-keyed-table>

        </jdbc:string-keyed-jdbc-store>

      </persistence>
    </local-cache>
  </cache-container>

</infinispan>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy