Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » EventAdmin best practices(How to transport data from one bundle to another)
EventAdmin best practices [message #637091] Thu, 04 November 2010 07:21 Go to next message
Benoît Thiébault is currently offline Benoît ThiébaultFriend
Messages: 11
Registered: October 2010
Junior Member
Hi everyone,

I have read this very interesting article regarding OSGi EventAdmin Service and one of the references provided.

In the latter, it is said that
Quote:

Placing non-primitive types (types other than string and and the eight primitive types) as Event Property values is far form being considered a best practice since in cases where the handler of your event exists in a different environment (different VM for example), the handler might not be able to deserialize the property.



While I do agree with the deserialization problem, I wonder what the best practices are to transfer objects from one bundle to another.
For instance, if I have one complex object that is setup by a given bundle and processed by a second one, how would you transfer the object? Using Services might answer the problem but the application I am developing should transfer a lot of objects between bundles and creating a Service for each one of them could be a painful task.

Kind regards

Ben
Re: EventAdmin best practices [message #637288 is a reply to message #637091] Thu, 04 November 2010 21:18 Go to previous message
BJ Hargrave is currently offline BJ HargraveFriend
Messages: 60
Registered: July 2009
Member
You can pass complex objects in the Event. But you do need to be concerned about mutability of those objects. If the object is immutable, it is quite safe to pass. But if the object is mutable, a handler can mutate it and the remaining handler may be affected by the change.
Previous Topic:VTK and Equinox on Mac OS X
Next Topic:[Equinox Weaving] @Aspect ignored
Goto Forum:
  


Current Time: Fri Mar 29 05:09:26 GMT 2024

Powered by FUDForum. Page generated in 0.25323 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top