1
이 다음 코드는 MongoDB를 연결왜이 연결을 개방하여 MongoDB에서 MongoClient 인스턴스를 호출이
val SERVER:ServerAddress = {
val hostName=config.getString("db.hostname")
val port=config.getString("db.port").toInt
new ServerAddress(hostName,port)
}
val DATABASE:String = config.getString("db.dbname")
val connectionMongo = MongoConnection(SERVER)
을 받고 때 나는 그것이 하나의 연결을 작성해야한다고 생각하지만, mongod 콘솔에서 왜이
2016-06-24T16:20:15.412+0500 [initandlisten] waiting for connections on port 27017
2016-06-24T16:20:38.543+0500 [initandlisten] connection accepted from 127.0.0.1:45712 #1 (1 connection now open)
2016-06-24T16:20:38.560+0500 [initandlisten] connection accepted from 127.0.0.1:45713 #2 (2 connections now open)
일이 일어나고 2 연결을 보여줍니다
그래서 MongoClient를 인스턴스화 할 때 두 개의 연결을 수락하지 않으면 해당 연결이 정상입니다. – swaheed