Skip to content

Instantly share code, notes, and snippets.

@khamiltonuk
Created November 29, 2015 22:51
Show Gist options
  • Select an option

  • Save khamiltonuk/abec6e2690edc3077227 to your computer and use it in GitHub Desktop.

Select an option

Save khamiltonuk/abec6e2690edc3077227 to your computer and use it in GitHub Desktop.
Enabling MongoDB replica set
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd">
<mongo:mongo id="mongo" replica-set="localhost:27017,localhost:27018,192.156.93:27017" >
<mongo:options
connections-per-host="20"
threads-allowed-to-block-for-connection-multiplier="5"
slave-ok="true"/>
</mongo:mongo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment