Hello, in our application there are (collection) fields for which we sometimes want to use proxies and sometimes not.
It is possible that different PersistenceBrokers simulaneously access different instances of that field in different threads, one should use a proxy and the other should not. I have noticed the MetaDataManager.setEnablePerThreadChanges(). It seems to give us a chance to fulfill that wish, but I am unhappy with it, so I would like to ask you if I have understood correctly: I do the following during initialization MetadataManager.getInstance().setEnablePerThreadChanges(true); and every time I want to use different settings than the default ones, then I do --------- // modify the MetaDataManager to globally // use a different RepositoryDescriptor MetaDataManager.getInstance().setDescriptor(MY_TEMP_DESCRIPTOR); PersistenceBroker pb = PersistenceBrokerFactory.defaultPersistenceBroker(); // ugly downcast. refresh() causes pb to get its // descriptor-repository from the MetaDataManager ((PersistenceBrokerImpl)pb).refresh(); [do all database stuff here ...] // afterwards, possibly in finally block: // reset descriptor in globally MetaDataManager.getInstance().setDescriptor(MY_NORMAL_DESCRIPTOR); // will invoke refresh() to reset the descriptor pb.close(); -------- Is that the intended usage of that feature? There are a couple of things that I dislike, so if I am right, I would like to discuss a different solution with you. Olli --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
