aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Huss (JIRA)" <>
Subject [jira] Commented: (ARIES-108) bundle.getBundleContext().getBundles() throws NPE on INSTALLED Bundles
Date Mon, 11 Jan 2010 20:32:54 GMT


Roland Huss commented on ARIES-108:

In fact, listBundles works much faster (10 times for Glassfish) now with the same setup:

Glassfish v3, 223 Bundles (not 248 as stated above,sorry) --> Execution time: 534ms 
Felix, 10 Bundles -> Execution time: 115ms

A second invocation on Glassfish v3 works even faster: 316ms (though I don't know why, maybe

some internal caching ?)

All numbers where taken via System.currentTimeMillis() (nearly) before and after the (local)
JMX call.
There is probably some constant overhead involved, but it seems that the 
execution times scale nearly linearly with the number of bundles installed.

Thanks for the excellent work, I really appreciate it!

> bundle.getBundleContext().getBundles() throws NPE on INSTALLED Bundles
> ----------------------------------------------------------------------
>                 Key: ARIES-108
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>    Affects Versions: Incubation
>            Reporter: Roland Huss
>            Assignee: Alan Keane
>            Priority: Critical
>         Attachments: patch.txt
> Within FrameworkUtils when extracting imported packages or dependencies
> this is done by looking up all bundles via the Bundle's BundleContext. 
> Unfortunately  bundle.getBundleContext() returns null for non-resolved bundles.
> One can workaround this by checking for null, but this will nevertheless miss
> Bundles in certain states.
> BTW, I agree that the dependency resolution via iteration for each 
> JMX call is ugly (and expensive!). There must be a better way ....

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message