Without digging into the code, I'd say they might fail if the store is not open. The identifiers will have to be retrieved from the underlying database unless the store has them cached. This retrieval can only be done on an open store.
I think your problem lies more in the use of the stores. Two points on that:
1) In all my days using Ontopia, I've never manually called store.open() or even isOpen(). The general case I always use is:
TopicMapStoreIF store = null;
try {
store = reference.createStore( {readonly?} );
TopicMapIF topicmap = store.getTopicMap();
// do something with topicmap
// store.commit() if changes were made on an rw-store
} catch (IOException ioe) {
// something went wrong opening the store
} finally {
if (store != null) store.close();
}
The reference.createStore() should take care of opening the store and the store.close() should notify the store-pooling mechanism that the store is available for other use again.
2) Am I right to infer that you are caching the '_topicMap' object? If so, you shouldn't. The TopicMapStoreIF works like a transaction, and the TopicMapIF that you get from it is bound to it. Using the TopicMapIF (or any other topicmap object like TopicIF) after you closed the store will result in errors.
In most situations, caching the TopicMapReferenceIF works best. Then use the code above whenever you need to execute an action/query on the topicmap.
With regards,
Quintin Siebers
--
(+31) (0)6 - 11 06 16 27
Morpheus Kennistechnologie BV
<URL: http://www.mssm.nl >
postbus 69
3500 CD Utrecht
KVK 30 26 04 30