我在创建连接时使用mongo数据库为我的应用程序连接假脱机配置了下面的mongoOption
MongoOptions options = new MongoOptions(); options.autoConnectRetry = true; options.connectionsPerHost = 40; options.threadsAllowedToBlockForConnectionMultiplier = 25;
除了我的应用程序,获得以下异常
com.mongodb.MongoInterruptedException: A driver operation has been interrupted at com.mongodb.DBPortPool.get(DBPortPool.java:216) at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:440) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:177) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155) at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:349) at com.mongodb.DBCollection.update(DBCollection.java:177) at com.mongodb.DBCollection.save(DBCollection.java:817) at com.mongodb.DBCollection.save(DBCollection.java:785) at cherrypick.ck.datalayer.mongo.MongoDataAccessLayer.saveObject(MongoDataAccessLayer.java:361) at cherrypick.ck.emailinterface.CKMailMonitor.processIncomingMessage(CKMailMonitor.java:170) at cherrypick.ck.emailinterface.CKMailMonitor.monitorNewMessages(CKMailMonitor.java:253) at cherrypick.ck.emailinterface.CKMailMonitor.run(CKMailMonitor.java:275) Caused by: java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1325) at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414) at com.mongodb.util.SimplePool.permitAcquired(SimplePool.java:148) at com.mongodb.util.SimplePool.get(SimplePool.java:110) at com.mongodb.DBPortPool.get(DBPortPool.java:214)
任何人都可以帮我解决这个问题.
在此先感谢Raja Subramani