[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] My experience with ECF


One issue that we ran into was that we were using an EClass with EOperations to define the interface that we publish as an OSGi service.  Using the default parameters in the genmodel gave us methods that return an EList<EClass> instead of a normal List<Class>.  The EList caused problems during serialization, so we wound up regenerating the interface class using the "suppress EMF types" option set to true.  We only needed to use this option for the interface classes, not the data types being passed.

Much of our data types were serializable without any needed updates.  The problem popped up when we had use the EDataType to bring in other Java types that are not seriailizable.  We wound up writing a single serialization helper class that packs an EObject into a resource and then serialized the resource.  The opposite happens on the receive side.  It was a lot of work to capture all of the referenced objects as well, since they have to be packed into the resource as well (in reverse order).  This was the bane of my existence for a few weeks.  We updated the Class.javajet template to have each class implement serializable and added the writeObject and readObject to turn around and call our Serialization helper.

Much of the debugging included writing the serialization resource to a temp file on writeObject and readObject so we could get an idea of what data was being included.  Also - don't forget to find the properties that govern the timeout values and update them to give you enough time to step through code if needed.

Another note that I still do not understand - there were unit tests that ran successfully in a single process (writing to a byte stream and reading an object back from the byte stream) that failed when run cross process through a socket.  There may be some static registration of objects happening in the Resource class that allowed things to pass.  I did not have enough time to fully investigate.

I'll update this thread as I remember more issues.

Feel free to drop in more questions as well.  I plan on creating a type of "Lessons Learned" presentation on this.


From: "Hallvard TrÃtteberg" <hal@xxxxxxxxxxx>
To: ecf-dev@xxxxxxxxxxx
Sent: Sunday, November 2, 2014 1:32:25 PM
Subject: Re: [ecf-dev] My experience with ECF

Hi J.,

I'm using EMF for almost everything I do, so I'm very interested in your experience with EMF, remote OSGi and object serialization. Could you say more about the problems, obstacles and solutions?

- Hallvard

ecf-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit