Re: [mdr-users] Different instances of NBMDRepositoryImpl are not independant from each other - Feature or Bug?
Martin Matula <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
You have to specify different storage file names for these two repositories: args1.put(BtreeFactory.STORAGE_FILE_NAME, fileName1); args2.put(BtreeFactory.STORAGE_FILE_NAME, fileName2); Regards, Martin [email protected] wrote: > > >Hi, > >when I have two instances of NBMDRepositoryImpl running within the same VM >they seem to influence each other: > >First: > >_args = new HashMap(); >_args.put("storage", >"org.netbeans.mdr.persistence.memoryimpl.StorageFactoryImpl"); >_args.put("STORAGE_ID", "first"); >MDRepository repository1 = new NBMDRepositoryImpl(_args)); > >Second: > >_args = new HashMap(); >_args.put("storage", >"org.netbeans.mdr.persistence.memoryimpl.StorageFactoryImpl"); >_args.put("STORAGE_ID", "second"); >MDRepository repository2 = new NBMDRepositoryImpl(_args)); > >Then: > >repository1.createExtent("foo"); >repository2.createExtent("bar"); > >Results in: > >[org.netbeans.mdr.Logger] INFORMATIONAL *********** Exception occurred >************ at Thu Jun 16 18:55:11 CEST 2005 >org.netbeans.mdr.util.DebugException: Boot failed. > at >org.netbeans.mdr.NBMDRepositoryImpl.installPureMof(NBMDRepositoryImpl.java:1269) > at >org.netbeans.mdr.NBMDRepositoryImpl.boot(NBMDRepositoryImpl.java:1236) > at >org.netbeans.mdr.NBMDRepositoryImpl.initCheck(NBMDRepositoryImpl.java:669) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:402) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:273) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:261) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:250) > > >and: > >org.netbeans.mdr.util.DebugException: Missing storage files or different >storage version. > at >org.netbeans.mdr.storagemodel.MdrStorage.initializeIndexes(MdrStorage.java:508) > at >org.netbeans.mdr.storagemodel.MdrStorage.rollback(MdrStorage.java:555) > at >org.netbeans.mdr.util.TransactionMutex.end(TransactionMutex.java:74) > at >org.netbeans.mdr.util.MultipleReadersMutex.leave(MultipleReadersMutex.java:174) > at >org.netbeans.mdr.NBMDRepositoryImpl.endTrans(NBMDRepositoryImpl.java:236) > at >org.netbeans.mdr.NBMDRepositoryImpl.boot(NBMDRepositoryImpl.java:1242) > at >org.netbeans.mdr.NBMDRepositoryImpl.initCheck(NBMDRepositoryImpl.java:669) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:402) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:273) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:261) > at >org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:250) > > >It seems that this is also true for two MDRepositories with different >storage types. Maybe the problem is located deeper? >Is it a feature or a bug? >It would be kind of maddening if two ore more MDRepositories in one VM were >not possible to run ;) > >Greetings > >-- >René Freude > >DaimlerChrysler AG >Research E/E and Information Technology / >Software Technology, Methods and Tools (REI/SM) > >Email: [email protected] > > >