persistence@glassfish.java.net

Re: TopLink tries to initialize classes while loading

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Thu, 08 Dec 2005 19:58:28 +0530

Hi Tom,

Tom Ware wrote:

> Sahoo,
>
> Is this urgent?

I just wanted to convey that we need to address it before release. It's
a P3 issue which a/c to our release policy should be fixed before the
product release. So we have time. Thanks for tracking this at your end.

Thanks,
Sahoo

> If so, I can raise the priority of the internal bug we have to track
> this issue.
> -Tom
>
> Sanjeeb Kumar Sahoo wrote:
>
>> Hi Tom,
>>
>> Earlier I had raised this once. Is it necessary for the classes to be
>> initialised when they are being loaded for introspection purpose? I
>> don't think so. In that case, can TopLink Essential code be changed
>> not to initialize classes while loading them? I found the following
>> code in TransformerFactory.java by accidentally entering into that
>> file while debugging:
>> Class clz =
>> oracle.toplink.essentials.internal.security.PrivilegedAccessController.getClassForName(descriptor.getJavaClassName(),
>> true, classLoader);
>>
>> We have had bugs raised by our customers for such issues especially
>> when static-initializer code assumes it is running in an active
>> application context.
>>
>> Thanks,
>> Sahoo
>>
>>
>