in src/main/java/org/apache/servicemix/store/mongo/MongoStore.java [154:179]
public Object load(String id) throws IOException {
evict();
Object obj = null;
try {
DBObject object = new BasicDBObject();
object.put(ID, id);
DBObject item = collection.findOne(object);
WriteResult result = collection.remove(object);
if (item == null) {
throw new IOException("Could not find item with id " + id);
}
byte[] data = (byte[]) item.get(DATA);
if (data != null) {
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(data));
try {
obj = ois.readObject();
} finally {
ois.close();
}
}
fireRemovedEvent(id,data);
} catch (Exception e) {
throw (IOException) new IOException("Error loading object").initCause(e);
}
return obj;
}