2007/11/28, Simon Nash <[EMAIL PROTECTED]>: > > Jean-Sebastien Delfino wrote: > > > Jean-Sebastien Delfino wrote: > > > >> Raymond Feng wrote: > >> > >>> I think there are two options: > >>> > >>> 1) Make the JAXB databinding as the default databinding for POJOs > >>> (simple and complex types). > >> > >> > >> What about doing that? any drawback? > >> > > > > And, jumping ahead and assuming that any drawbacks are acceptable, what > > about using that as well instead of where we currently use Java > > serialization to achieve "pass by value" through remotable interfaces. > > > > That'll allow us to remove the requirement for objects that flow through > > a remotable interface to implement java.io.Serializable, which is not > > quite right. > > I think the main issue we need to resolve in order to make this change > is to solve the problem with passing interface types that has been raised > on the user list. Java serialization takes care of this by encoding the > class name in the serialized form. > > There are also likely to be a number of restrictions on what is allowed > in the object being copied that are imposed by the default JAXB mapping > but don't apply to Java serialization. I'm a bit concerned that we could > end up with limitations that are more severe than the current limitation > of needing to implement java.io.Serializable. > > Another alternative to using Java serialization is to write an in-memory > reflective cloning function. This would probably be more efficient > than serialization, would not require java.io.Serializable, and should > be able to support pretty much any Java object. > > There's also the possibility of a hybrid approach, where we would use > Java serialization if the object implements java.io.Serializable and > some other approach (e.g., JAXB or cloning) if it doesn't.
One of the first problem that i had, when I started using Tuscany, was that I was serialize something without a mapping, because I wanted that a job was something more generics possible, i couldn't. It will be nice if this scenario changes. There are two ways to serialize something, in the current svn there's a Externizable trasformer and it's a step forward in changing this scenario. The next one it will provide something for Serializable.In this way, you have two choices: an efficient mapping for POJO and a way for an user to send Objects over your components. Just, my 1 cent. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
