Mirror not loading data into space
Using this:
http://www.gigaspaces.com/wiki/display/OLH/MirrorServiceExamples
and this:
http://www.gigaspaces.com/wiki/display/GS6/OpenSpacesPersistencyScenarios-+Mirror
as guides, I was able to get a mirror service setup and working in a very simple scenario... or so I thought. I can create domain objects that are successfully mirrored to a database, however when I shut everything down and restart the mirror, the data is not being loaded back into the space and therefore not accessible to the client application that uses the space.
Here is my current setup
Mirror Configuration
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/guildman"/>
<property name="username" value="root"/>
<property name="password" value=""/>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingLocations">
<list>
<value>classpath:mapping/AppUser.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
<prop key="hibernate.cache.usesecondlevel_cache">false</prop>
<prop key="hibernate.cache.usequerycache">false</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
<bean id="hibernateDataSource" class="com.gigaspaces.datasource.hibernate.HibernateDataSource">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<os-core:space id="space" url="/./mirror-service" schema="mirror" external-data-source="hibernateDataSource"/>
Space Configuration
<os-sla:sla cluster-schema="partitioned-sync2backup" number-of-instances="1" number-of-backups="1" max-instances-per-vm="1"/>
<os-core:space id="space" url="/./primaryDataSpace" mirror="true" />
I certainly have a lot more to learn, but it was my understanding that the primaryDataSpace would automatically be populated with the data via the mirror. Is this incorrect? Is there a step I'm missing that explicitly tells the primaryDataSpace to use the mirror to load the data?
Matt
This thread was imported from the previous forum.
For your reference, the original is available here