infinispan for SQL server

时间:2014-04-22 15:13:54

标签: sql sql-server eclipse jdbc infinispan

我需要一个用于sql server的模板infinispan。

或解释每个标签的教程,指向h2数据库的示例,或解释每个标签的教程,指向h2数据库的示例。

<?xml version="1.0" encoding="UTF-8"?>
<infinispan
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd
urn:infinispan:config:jdbc:6.0 http://www.infinispan.org/schemas/infinispan-cachestore-jdbc-config-6.0.xsd"
        xmlns="urn:infinispan:config:6.0">
    <namedCache name="persisted_repository">
        <persistence passivation="false">
            <stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:6.0"
                    fetchPersistentState="false"
                    ignoreModifications="false"
                    purgeOnStartup="false">
                <connectionPool
                        connectionUrl="jdbc:h2:file:target/content/db;DB_CLOSE_DELAY=-1"
                        driverClass="org.h2.Driver"
                        username="sa"/>
                <stringKeyedTable
                        prefix="ISPN_STRING_TABLE"
                        createOnStart="true"
                        dropOnExit="false">
                    <idColumn name="ID_COLUMN" type="VARCHAR(255)"/>
                    <dataColumn name="DATA_COLUMN" type="BINARY"/>
                    <timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT"/>
                </stringKeyedTable>
           </stringKeyedJdbcStore>
        </persistence>
        <transaction
            transactionManagerLookupClass="org.infinispan.transaction.lookup.DummyTransa`c`tionManagerLookup"
            transactionMode="TRANSACTIONAL"
            lockingMode="OPTIMISTIC" />
    </namedCache>
</infinispan>

1 个答案:

答案 0 :(得分:0)

如果要连接到MySQL,唯一需要更改的是connectionPool:

<connectionPool
   connectionUrl="jdbc:mysql://mysql.example.com:3306/my_db"
   driverClass="com.mysql.jdbc.Driver"
   username="db_user"
   password="db_pwd" />