Re: Service cleanup best practices (Was: [osgi-dev] What happens to class instances when bundle containing the class unloads)

2011-02-24 Thread Peter Kriens
I'll give you exposure on my blog if you make this work for me :-) Kind regards, Peter Kriens On 24 feb 2011, at 00:18, chris.g...@k-embedded-java.com wrote: Peter, I guess it is all about what you find more important: running bad code on a politically correct VM, or killing that

Re: Service cleanup best practices (Was: [osgi-dev] What happens to class instances when bundle containing the class unloads)

2011-02-21 Thread chris . gray
Peter A very cheap way to do what I want is to let the VM just throw some runtime exception on any object that is from a stale class loader. You make it all sound so easy. :-) If you mean throw some runtime exception on any *access to* object that is from a stale class loader then you are

Re: Service cleanup best practices (Was: [osgi-dev] What happens to class instances when bundle containing the class unloads)

2011-02-20 Thread chris . gray
NJB Given that there is no way to take an object away from someone who has a reference to the object, the service contract should state the behavior of the object outside of its defined life time. I remember a conversation with Peter a few years ago where Peter was wondering whether it would

Service cleanup best practices (Was: [osgi-dev] What happens to class instances when bundle containing the class unloads)

2011-02-18 Thread Simon Chemouil
Hi there, I'm resurrecting an old thread that went relatively unnoticed (only one reply) but that has been bothering me when I thought back about it lately. The problem is described in the original message below, but in one word: I'm looking for best practices when it comes to cleaning after a