Вопрос

I'm using IBM FileNet CE API 5.1 and facing perfomance problem because of additional refreshing in loop with great iteration amount (25000+). Here is code sample:

for (Document document : documents) {
       ObjectStore objectStore = document.getObjectStore();
       objectStore.refresh(); //round-trip
       String symbolicName = objectStore.get_SymbolicName();

       ...
 }

The problem is, objectStore object before refresh doesn't have any cached properties at all, even object identity (if I had I could create object store cache to avoid refreshing in every iteration).

Documents may have different object stores (I'm searching through multiple object stores).

Это было полезно?

Решение

You can obtain the id of object store from object reference:

document.getObjectReference().getObjectStoreIdentity()

Другие советы

There is a way to get object store id through EngineObjectImpl.getObjectStoreReference():

GlobalIdentity objectStoreReference = ((EngineObjectImpl)object).getObjectStoreReference();
Id objectId = objectStoreReference.getObjectId();
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top