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
To: OSGi Developer Mail List <[email protected]>
Date: 08/04/2011 12:00 PM
Subject: Re: [osgi-dev] BundleEvent and others extend EventObject even
though they aren't serializable
> to Bundle objects, which themselves are serializable
I think Richard means *not* serializable.
> declare these two fields as transient
While this will technically make the object serializable, deserializing
will produce a meaningless object since it will not have any bundle
objects. I think this is wrong. It is better that the object fails to
serialize so people realize fast that the object cannot be properly
serialized.
--
BJ Hargrave
Senior Technical Staff office: +1 386 848
Member, IBM 1781
OSGi Fellow and CTO of the mobile: +1 386 848
OSGi Alliance 3788
[email protected]
From: "Richard S. Hall" <[email protected]>
To: OSGi Developer Mail List <[email protected]>
Date: 2011/08/04 12:32
Subject: Re: [osgi-dev] BundleEvent and others extend EventObject
even though they aren't serializable
Sent by: [email protected]
The issue is that BundleEvent is a concrete class that has two references
to Bundle objects, which themselves are serializable. So you run into
issues if you actually try to serialize a BundleEvent. The only potential
solution is to modify the standard BundleEvent class impl to declare these
two fields as transient in the next spec release.
-> richard
On 8/4/11 11:16, Martin Petzold wrote:
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] http://www.osgi.org/javadoc/r4v43/org/osgi/framework/BundleEvent.html
Thanks,
Martin
Am 04.08.2011 17:08, schrieb [email protected]:
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 which ignore these types of object when
sending them through RMI (or other times serializing is involved).
Thanks,
David Humeniuk
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
<<inline: graycol.gif>>
<<inline: ecblank.gif>>
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
