|summary:||Issue #6135: Don't use bootdelegation=* in OSGi env|
|date:||2009-03-21 09:24:08 UTC (6 years)|
|message:||Issue #6135: Don't use bootdelegation=* in OSGi env
To fix this issue, we are doing the following:
Earlier APIClassLoader was just the classloader for module GlassFish-Application-Common-Module.
Since it was using bundle.loadClass in its loadClass implementation, it was not delegating
to parent. The delegation was happening internally by bundle.loadClass depending on
bootdelegation property. Since bootdelegation was set to *, it was effectively delegating to parent
first for every class loading.
Now, we create a wrapper classloader that first calls bundle.loadClass and then if class is not found,
we delegate to the parent. As a result, we don't have to set bootdelegation flag to * for all modules.
We are forced to delegate for the following packages:
org.xml.sax.*, javax.xml.* for EclipseLink.
javax.transaction.* to avoid loader constraint violation as javax.sql, which
comes from JDK, depends on javax.transaction.
QL passes with this change.