code: public void mergeDescriptorRepository(
              DescriptorRepository targetRepository, DescriptorRepository sourceRepository, boolean deep)
      {
          Iterator it = sourceRepository.iterator();
          while (it.hasNext())
          {
              ClassDescriptor cld = (ClassDescriptor) it.next();
              if (deep)
              {
                  //TODO: adopt copy/clone methods for metadata classes?
                  cld = (ClassDescriptor) SerializationUtils.clone(cld);
              }
              targetRepository.put(cld.getClassOfObject(), cld);
              cld.setRepository(targetRepository);
          }
      }
docs: Merge the given {@link org.apache.ojb.broker.metadata.DescriptorRepository}
  files, the source objects will be pushed to the target repository. If parameter
  <tt>deep</tt> is set <code>true</code> deep copies of source objects were made.
  <br/>
  Note: Using <tt>deep copy mode</tt> all descriptors will be serialized
  by using the default class loader to resolve classes. This can be problematic
  when classes are loaded by a context class loader.
  <p>
  Note: All classes within the repository structure have to implement
  <code>java.io.Serializable</code> to be able to create a cloned copy.
  
  @see #isEnablePerThreadChanges
  @see #setEnablePerThreadChanges