Any ideas?

czw., 23 maj 2019 o 15:22 Tomasz Prus <[email protected]> napisał(a):

> Interestingly, when i run evictCollectionData twice, it works.
>
> czw., 23 maj 2019 o 13:39 Tomasz Prus <[email protected]> napisał(a):
>
>> Hello,
>> I have configured Ignite cache with Hibernate 2L cache for to instances
>> and almost everything works fine but when trying to evict collection data
>> after new entity creation, seems that eviction doesn't work because there
>> is no new entity in that evicted collection. My configs:
>>
>> <bean id="transactional-cache"
>> class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
>>         <property name="cacheMode" value="REPLICATED"/>
>>         <property name="atomicityMode" value="TRANSACTIONAL"/>
>>         <property name="writeSynchronizationMode" value="FULL_SYNC"/>
>>         <property name="statisticsEnabled" value="true"/>
>>         <property name="nearConfiguration">
>>             <bean
>> class="org.apache.ignite.configuration.NearCacheConfiguration"/>
>>         </property>
>>     </bean>
>>
>>     <bean id="igniteInstance"
>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>         <property name="peerClassLoadingEnabled" value="true"/>
>>         <property name="igniteInstanceName" value="myGrid"/>
>>         <property name="cacheConfiguration"><list>
>>             <!--
>>                 Configurations for entity caches.
>>             -->
>>             <bean parent="transactional-cache">
>>                 <property name="name"
>> value="org.hibernate.cache.spi.UpdateTimestampsCache"/>
>>             </bean>
>>
>>             <bean parent="transactional-cache">
>>                 <property name="name"
>> value="org.hibernate.cache.internal.StandardQueryCache"/>
>>             </bean>
>>             <bean parent="transactional-cache">
>>                 <property name="name"
>> value="default-query-results-region"/>
>>             </bean>
>>             <bean parent="transactional-cache">
>>                 <property name="name"
>> value="default-update-timestamps-region"/>
>>             </bean>
>>
>>             <bean parent="transactional-cache">
>>                 <property name="name" value="lock-cache"/>
>>             </bean>
>>             <bean parent="transactional-cache">
>>                 <property name="name" value="query.ProjectDAO"/>
>>             </bean>
>> </list>
>>         </property>
>>         <property name="discoverySpi">
>>             <bean
>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>                 <property name="ipFinder">
>>                     <bean
>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>                         <property name="multicastGroup"
>> value="228.10.10.157"/>
>>                     </bean>
>>                 </property>
>>             </bean>
>>         </property>
>>     </bean>
>> ...
>> <bean id="dataSource" class = "com.mchange.v2.c3p0.ComboPooledDataSource"
>> destroy-method="close">
>>         <property name="driverClass"
>> value="${hibernate.connection.driver_class}" />
>>         <property name="jdbcUrl" value="${hibernate_connection_url}" />
>>         <property name="user" value="${hibernate.connection.username}" />
>>         <property name="password"
>> value="${hibernate.connection.password}" />
>>
>>         <!-- these are C3P0 properties -->
>>         <property name="acquireIncrement" value="2" />
>>         <property name="initialPoolSize" value="30" />
>>         <property name="minPoolSize" value="30" />
>>         <property name="maxPoolSize" value="50" />
>>         <property name="maxIdleTime" value="60" />
>>
>>         <property name="acquireRetryAttempts" value="3" />
>>         <property name="acquireRetryDelay" value="3000" />
>>
>>         <property name="idleConnectionTestPeriod" value="3600" />
>>         <property name="preferredTestQuery" value="SELECT 1 " />
>>
>>         <property name="maxIdleTimeExcessConnections" value="3600" />
>>         <property name="maxConnectionAge" value="7200" />
>>
>>         <property name="checkoutTimeout" value="50000" />
>>
>>     </bean>
>>
>>     <bean id="sessionFactory"
>> class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"
>> depends-on="igniteInstance">
>>
>>         <property name="dataSource">
>>             <ref bean="dataSource"/>
>>         </property>
>>
>>         <property name="hibernateProperties">
>>             <props>
>>                 <!--<prop key="hibernate.show_sql">true</prop>-->
>>                 <prop
>> key="hibernate.session_factory_name">our-session-factory</prop>
>>                 <prop
>> key="hibernate.session_factory_name_is_jndi">false</prop>
>>                 <prop key="hibernate.dialect">${hibernate.dialect}</prop>
>>                 <prop key="hibernate.generate_statistics">false</prop>
>>                 <prop key="hibernate.connection.useUnicode">true</prop>
>>                 <prop
>> key="hibernate.connection.characterEncoding">UTF-8</prop>
>>                 <prop key="hibernate.cache.use_query_cache">true</prop>
>>                 <prop
>> key="hibernate.cache.use_second_level_cache">true</prop>
>>                 <prop
>> key="hibernate.cache.region.factory_class">org.apache.ignite.cache.hibernate.HibernateRegionFactory</prop>
>>                 <prop
>> key="org.apache.ignite.hibernate.default_access_type">READ_WRITE</prop>
>>                 <prop
>> key="org.apache.ignite.hibernate.ignite_instance_name">myGrid</prop>
>>             </props>
>>         </property>
>>
>> If i use only one instance (one application), eviction works fine. Can
>> You help me?
>>
>

Reply via email to