我们在一个Servlet容器上使用Xodus,应用时不时抛出这个错误(不知道是什么原因)jetbrains.exodus.ExodusException: Can't acquire environment lock after 0 ms. Lock owner info: null at jetbrains.exodus.log.Log.tryLock(Log.java:935) at jetbrains.exodus.log.Log.<init>(Log.java:91) at jetbrains.exodus.env.Environments.newLogInstance(Environments.java:137) at jetbrains.exodus.env.Environments.newLogInstance(Environments.java:115) at jetbrains.exodus.env.Environments.newLogInstance(Environments.java:104) at jetbrains.exodus.env.Environments.newInstance(Environments.java:49) at jetbrains.exodus.env.Environments.newInstance(Environments.java:39)什么可能导致这种情况发生?示例用法:public void put(String instance, final String storeName, final String key, final String value) { final Environment env = Environments.newInstance(xodusRoot + instance); env.executeInTransaction(new TransactionalExecutable() { @Override public void execute(@NotNull final Transaction txn) { final Store store = env.openStore(storeName, StoreConfig.WITHOUT_DUPLICATES, txn); store.put(txn, StringBinding.stringToEntry(key), StringBinding.stringToEntry(value)); } }); env.close();}如果这put方法是从一个Servlet端点调用,服务器因此多个并发客户端调用此方法。
添加回答
举报
0/150
提交
取消