Re: Why Bundle.update() method fires a PACKAGES_REFRESHED event ?

2009-04-10 Thread Karl Pauls
No. You don't need to worry about ClassCastExceptions as your bundle will be wired to the old revision of the bundle. Unless you don't import what you export :-) See http://felix.apache.org/site/apache-felix-osgi-faq.html for more on the why. regards, Karl On Fri, Apr 10, 2009 at 7:40 AM,

Re: Why Bundle.update() method fires a PACKAGES_REFRESHED event ?

2009-04-10 Thread Pierre De Rop
All right, I will try to import what I export. Thanks for your suggestion; /pierre Karl Pauls wrote: No. You don't need to worry about ClassCastExceptions as your bundle will be wired to the old revision of the bundle. Unless you don't import what you export :-) See

Re: Why Bundle.update() method fires a PACKAGES_REFRESHED event ?

2009-04-10 Thread Richard S. Hall
On 4/10/09 1:40 AM, Pierre De Rop wrote: Richard, Before posting an issue into osgi-dev about this subject, I would like to check with you if it really makes sense to wait for the PACKAGES_REFRESHED ... Here is my use case: * bundle B1 exports B1Service * B2 imports and implements

Re: Re : Problem with upnp examples

2009-04-10 Thread sana
hi francesco, i have the same problem , can you please tell me where can i find where tv can find the variable sent by Clock ( in which file/line) and where the clock (in Clock code ( in which file/line)) is putting the value and sending it to the TV thanks in advance, regards Sana 2009/4/8

maven-bundle-plugin: how to control import/export-packages from dependencies

2009-04-10 Thread Aaron Zeckoski
I am having trouble getting my Import-Package down to a reasonable size. It currently pulls in a huge number of things (based on bytecode scanning from what I understand). I think there may be 3 things I am doing wrong here but I cannot seem to find the answers so I am asking here instead. I

Re: maven-bundle-plugin: how to control import/export-packages from dependencies

2009-04-10 Thread Stuart McCulloch
2009/4/10 Aaron Zeckoski aar...@vt.edu I am having trouble getting my Import-Package down to a reasonable size. It currently pulls in a huge number of things (based on bytecode scanning from what I understand). I think there may be 3 things I am doing wrong here but I cannot seem to find the

Re: maven-bundle-plugin: how to control import/export-packages from dependencies

2009-04-10 Thread Stuart McCulloch
2009/4/10 Stuart McCulloch mccu...@gmail.com 2009/4/10 Aaron Zeckoski aar...@vt.edu I am having trouble getting my Import-Package down to a reasonable size. It currently pulls in a huge number of things (based on bytecode scanning from what I understand). I think there may be 3 things I am

Re: Why Bundle.update() method fires a PACKAGES_REFRESHED event ?

2009-04-10 Thread Pierre De Rop
I have looked into the code of the package admin implementation, from the trunk, and I think I have found a working solution for my problem. Indeed, in the org.apache.felix.deploymentadmin.spi.StartBundleCommand class, the method execute just does the following, when refreshing synchronously:

Re: Why Bundle.update() method fires a PACKAGES_REFRESHED event ?

2009-04-10 Thread Pierre De Rop
I'm sorry, in the previous sample code, I forgot to remove the fwk listener after the refresh, so here is the good fix: public class BundleInstaller { BundleContext _bctx; PackageAdmin _pkgAdmin; // ... void update(Bundle[] bundles) { for (Bundle b : bundles) { b.stop();

Re: Why Bundle.update() method fires a PACKAGES_REFRESHED event ?

2009-04-10 Thread Richard S. Hall
Yes, that does make sense. You are correct that the listeners are snapshot'ed, so in this case you are more likely to see your own event. However, there is no guarantee that someone else didn't sneak in and make a request to PackageAdmin before you could do it. :-( But, assuming you know what