Armin Waibel wrote:

> Since ClassB is an "extent" of ClassA the merge of the repositories 
> isn't enough. The merge method is intended to merge/add new classes 
> without dependencies to already registered classes.
> You could try to use the ClassDescriptor.addExtent(...) method to 
> register a new "extent":
> 
> MetadataManager mm = MetadataManager.getInstance();
> DescriptorRepository dr =
> mm.readDescriptorRepository("my/additional/plugin_repository.xml");
> mm.mergeDescriptorRepository(dr);
> //then lookup the repository
> DescriptorRepository repo = mm.getRepository();
> // lookup the CLD of ClassA
> ClassDescriptor cldA = repo.getDescriptorFor(ClassA.class);
> // add the new extent
> cldA.addExtent(ClassB);
> 
> I never tried this ;-)

Heureka, it works!
Thanks Armin. I am now a big step further.
As all informations regarding the registration of the extent classes could be 
in the additional repository file to merge, it should be possible to add these 
lines of code to ojb, but I am unaware if this will break other things. Next 3 
weeks are holiday, so maybe I will have a look inside ojbs sourcecode.

Best regards

Bernd


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to