[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] SharedObject API Problem: Serialization Problem when adding TransactionSharedObject

Hello,

I'm working with the SharedObject API  and ran into a Problem.
I understand how to use the API when implementing a class which extends from BaseSharedObject
and implemented an shared object as described in the wiki.
It is all fine and works right as it should! by the way: Nice work guys :)

Then, I derived my class from TransactionSharedObject and set it up according to
an example I found here http://www.eclipse.org/ecf/NewAndNoteworthy_0.5.2.html (at the bottom).
I can not see any differences except that a timeout is set in the Primary and that the
EventProcessor is added in initialize() in TransactionSharedObject.

Anyway, when I am trying to add the shared object, I get an exception:
"org.eclipse.ecf.core.sharedobject.SharedObjectAddAbortException: SharedObjectCommitEvent could not be sent"
Setting a breakpoint in TwoPhaseCommitEventProcessor.sendCommit() revealed that Serialization failed:
"java.io.NotSerializableException: shared object messageSharedObjectCommitEvent[StringID[SharedObjID];null] not serializable"

I do not understand this, because the shared object class implements Serializable and serialization obviously worked before.
I have also removed all attributes from this class to test the basic mechanism, but still no luck.

Have I done something wrong in using TransactionSharedObject?

Jan