[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-dev] FYI: issue with reflection and OSGi ...
|
In his blog-post
http://coderthoughts.blogspot.com/2010/06/eek-java-reflection-can-cause.html,
David Bosschaert
highlights a 'weird' issue with OSGi and reflection.
OSGi very much wants all dependencies to be explicitly stated up-front
and typically one makes special arrangements
for those classes that are part of 'java.lang.*' or
'java.lang.reflect.*' However, when a field (or class) is accessed thru
reflection,
a counter ticks off the number of times the reflection call is made.
After 15 times, the system switches to an alternate code path
(switches to bytecode generation) that now requires 'sun.reflect.*'
Needless to say, this can present a real problem when deployed
in an OSGi environment and one hasn't make any arrangement for 'sun.*'
classes.
--
Mike Norman | Principal Software Designer | 613.288.4638
Oracle Server Technologies | EclipseLink Product
45 O'Connor Street, Suite 400 | Ottawa, ON K1P 1A4 | (fax) 613.238.2818