Is there a reason fields of those types couldn't be made transient?

 

David Humeniuk

 

From: BJ Hargrave [mailto:[email protected]] 
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 serializable

 

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 <http://www.osgi.org/> 
[email protected] <mailto:[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
<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