[OJB-developers] DescriptorRepository and ReverseDb
Brought to you by:
thma
From: Florian B. <bf...@fl...> - 2002-06-17 11:00:29
|
Hi! I have good news and bad news: First the good news: There was only one reference to DescriptorRepository.getInstance() left in ClassDescriptor and I was able to resolve that dependency in my local copy. Therefore I can now open more than one repository in my GUI. Now for the bad news: I really need some help with DescriptorRepository. For the last two days I tried to modify the classes so I can open a repository XML file without the classes described there being already on the classpath. Unfortunately I failed because I was not able to defer the class resolving until the classes are really used. Partially because I didn't understand the relations in DescriptorRepository and friends (e.g. concerning proxies, especially dynamic proxies). Partially because I do not have a clue how to solve issues without unwanted sideeffects. E.g. if I modify ClassDescriptor so I do not have to set a Class object but just the fully qualified class name and resolve the class only if I need it, how should this be handled in DescriptorRepository, which has an HashMap containing mappings from Class to ClassDescriptor. I do not have a Class at that time, so I would have to insert a mapping String->ClassDescriptor. But if the class is finally resolved (in ClassDescriptor), the mapping in the HashMap would have to be updated as well. Another problem was concerning extents. Extents are exposed to the rest of the world with the Vector containing the extent Class objects. If I want to defer class resolving, this Vector would have to contain Strings with the class name. But this would break things in the rest of OJB, because there it is expected that the Vector contains only Class objects. There are a number of other dependencies on the Class object but I do not remember all and I already discarded all my changes because there was nothing working at all anymore. To bring it to the point - I am completely stuck here and really badly need some help. best regards, Florian |