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 declare the event classes not serializable as 
far as I know. And we cannot really go back now and remove the base class. 
Sorry.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]

office: +1 386 848 1781
mobile: +1 386 848 3788





From:   [email protected]
To:     <[email protected]>
Date:   2011/08/04 11:22
Subject:        [osgi-dev] BundleEvent and others extend EventObject even 
though  they aren't serializable
Sent by:        [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

Reply via email to