4

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).

ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
sermolaev
  • 975
  • 11
  • 23

2 Answers2

5

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

document.getObjectReference().getObjectStoreIdentity()
ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
0

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

GlobalIdentity objectStoreReference = ((EngineObjectImpl)object).getObjectStoreReference();
Id objectId = objectStoreReference.getObjectId();
Ivan Nikolaev
  • 420
  • 2
  • 6
  • EngineObjectImpl is not part of public API. Using it is not safe should be avoided. – ᄂ ᄀ Aug 17 '13 at 18:31
  • That's true. But do you have any suggestions? API gives you only ObjectStore object with empty cache (no properties, not even guid). – sermolaev Aug 19 '13 at 05:10
  • @sermolaev It depends on how you obtain the object. Please see my comment to the question. – ᄂ ᄀ Aug 19 '13 at 06:06