Is there a notserializable javadoc tag? :-)
-- 

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:     "OSGi Developer Mail List" <[email protected]>
Date:   2011/08/04 15:35
Subject:        RE: [osgi-dev] BundleEvent and others extend 
EventObjecteven though  they aren't serializable
Sent by:        [email protected]



I would agree then.  Is there some way to document this in the spec or 
something?
 
David Humeniuk
 
From: Thomas Watson [mailto:[email protected]] 
Sent: Thursday, August 04, 2011 2:11 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] BundleEvent and others extend EventObjecteven 
though they aren't serializable
 
I agree with BJ, I would prefer to fail fast instead of ending up with 
serialized BundleEvents that have no meaning.

Tom



BJ Hargrave---08/04/2011 12:00:48 PM---> to Bundle objects, which 
themselves are serializable


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 Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected] 

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






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 
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

<<image/gif>>

<<image/png>>

<<image/png>>

<<image/png>>

<<image/png>>

<<image/png>>

<<image/png>>

<<image/png>>

<<image/png>>

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to