EventObject implements Serializable so any class extending it should be
serializable as well. However, BundleEvent and others are not
serialiable and as I understand are not intended to be.
Any chance the base class will change or am I stuck with this? I would
rather not have special logic
BundleEvent extends EventObject and thus implements Serializable [1],
did you perhaps mean org.osgi.service.event.Event. Would be great to
have org.osgi.service.event.Event serializable. I had some problems
about this while implementing a remote event admin some time ago.
[1]
I think you are stuck with this. It was a design mistake in R1 (c. 1999)
to base these classes on EventObject. Mea culpa.
There is no way to make them serializable. Bundle and ServiceReference
(types referenced by these classes) are not serializable and cannot be
made so. There is no way to
I do mean BundleEvent and as you were saying it extends EventObject and
thus implements Serializable. Therefore, I was expecting it to be
serializable. However, I know for Felix it is implemented with a
BundleImpl member that is not serializable so you get a
NotSerializableException when trying
Is there a reason fields of those types couldn't be made transient?
David Humeniuk
From: BJ Hargrave [mailto:hargr...@us.ibm.com]
Sent: Thursday, August 04, 2011 12:20 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] BundleEvent and others extend EventObject
eventhough they aren't
Isn't that the point of the transient to mark items of a serializable
class that can't be serialized? Is there a reason that shouldn't be
done?
David Humeniuk
From: Richard S. Hall [mailto:he...@ungoverned.org]
Sent: Thursday, August 04, 2011 12:24 PM
To: OSGi Developer Mail List
I agree with BJ, I would prefer to fail fast instead of ending up with
serialized BundleEvents that have no meaning.
Tom
From: BJ Hargrave/Austin/IBM@IBMUS
On 8/4/11 1:27 PM, david.humen...@l-3com.com wrote:
Isn't that the point of the transient to mark items of a serializable
class that can't be serialized? Is there a reason that shouldn't be done?
I'm personally fine with it.
- richard
David Humeniuk
*From:*Richard S. Hall
Is there a notserializable javadoc tag? :-)
--
BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargr...@us.ibm.com
office: +1 386 848 1781
mobile: +1 386 848 3788
From: david.humen...@l-3com.com
To: OSGi Developer Mail List