Hi,

> It seems like it might be possible to cache enhanced bytecode by class
> name until after transformation and all classes are defined.

It certainly should be possible, but currently, OpenJPA uses
reflection to load a bunch of information about the class during
enhancement.

-Patrick

On Jan 22, 2008 6:27 AM, Corey Klaasmeyer
<[EMAIL PROTECTED]> wrote:
> I'm generating persistent classes at runtime which are transformed by
> the PCClassFileTransformer.transform(ClassLoader, String, Class,
> ProtectionDomain, byte[]) method. Unfortunately, the result of the
> BCClass.getType() passed as the first argument to the method
> MetaDataRepository.getMetaData(Class, ClassLoader, boolean) in
> PCEnhancer(OpenJPAConfiguration, BCClass, MetaDataRepository,
> ClassLoader) throws a ClassNotFoundException -- the transformer is
> attempting to load a class that is not defined, therefore not loadable,
> until transformation is complete. Is there some fundamental reason why
> the enhancer needs a reference to a defined class rather than just the
> bytecode?
>
> It seems like it might be possible to cache enhanced bytecode by class
> name until after transformation and all classes are defined.
>
> Corey
>
>



-- 
Patrick Linskey
202 669 5907

Reply via email to