1 Reply Latest reply on Aug 24, 2006 11:08 AM by starksm64

    UnifiedClassLoader3 issues on dynamic POJOs

    adrian.andrei

      I guess this is not the right forum, but it is the closest I could find. If you have a problem with my posting here, let me know and I will post it in the appropriate forum.

      We have a bunch of POJOs in our application (that uses JBOSS 4.0.4 AS) that we generate using cglib based on a given meta-model. It is working fine but I noticed one issue: the UnifiedClassLoader3 doesn't register theses classes with the LoaderRepository, so the new POJO are not visible to other UnifiedClassLoaders. We do have a common class loading policy, so we were expecting to see the new classes available everywhere. The issue is that the defineClass method is not overridden, therefore the new class is registered locally but not with other classloaders (through LoaderRepository). We can work around internally but I though that you guys should know this issue. If it is a design on purpose (therefore we need to manage the life cycle ourselves) that's fine, otherwise you can add a couple of lines and register the new classes with the LoaderRepository in a overide of defineClass method.

      Regards,
      AA