geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (XBEAN-177) DelegatingBundle optimization
Date Wed, 08 Jun 2011 06:01:01 GMT

    [ https://issues.apache.org/jira/browse/XBEAN-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045802#comment-13045802
] 

Jarek Gawor commented on XBEAN-177:
-----------------------------------

In revision 1133254 I committed changes to DelegatingBundle not to delegate the classloading
if a wire is already established.


> DelegatingBundle optimization
> -----------------------------
>
>                 Key: XBEAN-177
>                 URL: https://issues.apache.org/jira/browse/XBEAN-177
>             Project: XBean
>          Issue Type: Improvement
>          Components: bundleutils
>    Affects Versions: 3.8
>            Reporter: Jarek Gawor
>            Assignee: Jarek Gawor
>
> DelegatingBundle forwards loadClass() (among other functions) to multiple bundles. Right
now the loadClass() implementation iterates over the bundles and attempts to load the class
from each bundle until the class is successfully loaded.
> This method can actually be harmful in certain situations for example with bundles with
DynamicImport-Package: *. It can needlessly establish a dynamic wired for the given package
on each bundle in the list. 
> One way to avoid this problem is to check (once CNFE is raised) if the given bundle is
wired to some bundle that exports the given package. If so, there is no need to check the
remaining bundles to load the class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message