4 Replies Latest reply on May 4, 2011 9:09 AM by vblagojevic

    Cluster mode problem

    niuxuetao_fiserv

      Hello,

       

      I need to use the DIST_ASYNC or DIST_SYNC mode in clustering, but whatever I set the @mode attribute of the <cluster> tag, even with a meaningless value "DIST_aaaSYNC", I always get exception:

       

      org.infinispan.config.ConfigurationException: Cache cannot use a clustered mode (DIST_SYNC) mode and not define a transport!

          at org.infinispan.config.Configuration.assertValid(Configuration.java:1123)

       

      On API level, I parse the following configuration in this way:

       

      InfinispanConfiguration.newInfinispanConfiguration(in).parseDefaultConfiguration();

       

      Below is my configuration:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xmlns="urn:infinispan:config:4.2">

          <global>

              <transport clusterName="xxxxxx"  >

              </transport>

          </global>

          <default>

       

              <!-- set max locking time to 1s -->

              <locking lockAcquisitionTimeout="1000" isolationLevel="READ_COMMITTED" />

       

              <!-- do not use Infinispan eviction -->

              <eviction maxEntries="1000" wakeUpInterval="-1" />

       

              <!-- enabling indexing -->

              <indexing indexLocalOnly="false" enabled="true" />

       

              <!-- set the clustering mode to "asyncronous distribution" -->

              <clustering mode="DIST_aaaSYNC">

                  <!-- this is the place to set the number of replications per store -->

                  <hash numOwners="2" />

       

              </clustering>

       

              <transaction />

       

              <!-- make sure to disable passivation -->

              <loaders passivation="false" shared="false" preload="true">

                  <loader

                      class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"

                      fetchPersistentState="false" ignoreModifications="false"

                      purgeOnStartup="false">

                      <properties>

                          <property name="dropTableOnExit" value="false" />

                          <property name="createTableOnStart" value="true" />

                          <property name="stringsTableNamePrefix" value="EVENT_CACHE_" />

       

                          <property name="idColumnName" value="ID_COLUMN" />

                          <property name="idColumnType" value="VARCHAR(255)" />

       

                          <property name="dataColumnName" value="DATA_COLUMN" />

                          <property name="dataColumnType" value="BINARY" />

       

                          <property name="timestampColumnName" value="TIMESTAMP_COLUMN" />

                          <property name="timestampColumnType" value="BIGINT" />

       

                          <property name="connectionFactoryClass"

                              value="my.RtdeConnectionFactory" />                   

       

                      </properties>

                  </loader>

              </loaders>

          </default>

      </infinispan>

       

      Please help, thanks!

      Xuetao