Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

How to write pojo in Mongodb?

following is my pu.xml <beans beans="" http:="" schema="" spring-beans.xsd"="" www.springframework.org="" xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:os-core="http://www.openspaces.org/schema/core" xmlns:os-events="http://www.openspaces.org/schema/events" xmlns:os-jms="http://www.openspaces.org/schema/jms" xmlns:os-remoting="http://www.openspaces.org/schema/remoting" xmlns:os-sla="http://www.openspaces.org/schema/sla" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans &lt;a href=">http://www.springframework.org/schema... http://www.springframework.org/schema... http://www.springframework.org/schema... http://www.openspaces.org/schema/core http://www.openspaces.org/schema/core... http://www.openspaces.org/schema/events http://www.openspaces.org/schema/even... http://www.openspaces.org/schema/remo... http://www.openspaces.org/schema/remo... http://www.openspaces.org/schema/sla http://www.openspaces.org/schema/sla/... http://www.openspaces.org/schema/jms http://www.openspaces.org/schema/jms/...></beans>

<os-sla:sla number-of-instances="1"/> <bean id="propertiesConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

<os-core:space id="mirrorSpace" url="/./mirror-service" schema="mirror" space-sync-endpoint="spaceSynchronizationEndpoint">
    <os-core:properties>
    <props>
        <prop key="space-config.mirror-service.cluster.name">MAGIC_INFO</prop>
        <prop key="space-config.mirror-service.cluster.partitions">${magic_info.partitions}</prop>
        <prop key="space-config.mirror-service.cluster.backups-per-partition">${magic_info.backups_per_partition}</prop>
        <prop key="space-config.mirror-service.operation-grouping">group-by-replication-bulk</prop>
    </props>
    </os-core:properties>
</os-core:space>
<bean id="mongoClient"
        class="com.gigaspaces.persistency.MongoClientConnectorBeanFactory">
        <property name="db" value="test" />
        <property name="config">
            <bean class="com.mongodb.MongoClient">
                <constructor-arg value="localhost" type="java.lang.String" />
                <constructor-arg value="27017" type="int" />
            </bean>
        </property>
 </bean>

 <bean id="spaceSynchronizationEndpoint"
        class="com.gigaspaces.persistency.MongoSpaceSynchronizationEndpointBeanFactory">
        <property name="mongoClientConnector" ref="mongoClient" />
 </bean>

</beans> e.g if i want to persist the following pojo/entity in mongodb then how to configure the pu.xml @Entity @Table(name="ifs_actlog") @SpaceClass public class ActivityLog implements java.io.Serializable { }

asked 2019-01-03 06:43:17 -0500

Datta gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

This issue was solved, version problem.

answered 2019-01-21 00:35:52 -0500

Ester gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-01-03 06:43:17 -0500

Seen: 121 times

Last updated: Jan 21