public List getJsonObjects(String spaceStr, String collectionStr, BSONObject matcher, BSONObject selector, BSONObject orderBy, long skipRows, long returnRows) {
ArrayList objects = new ArrayList();
Sequoiadb sdb = SequoiaDBConnectionPool.getConnection();
if (sdb.isCollectionSpaceExist(spaceStr)) {
CollectionSpace db = sdb.getCollectionSpace(spaceStr);
if (db.isCollectionExist(collectionStr)) {
DBCollection DBCollection = db.getCollection(collectionStr);
objects = this.getRecoders(DBCollection, matcher, selector, orderBy, skipRows, returnRows);
}
}
SequoiaDBConnectionPool.freeConnection(sdb);
return objects;
}
SequoiaDBConnectionPool.freeConnection(sdb);
方法在获得之后就立即释放可以吗?因为我已经得到了这个数据库连接对象了啊!