Hi,
I've already implemeted a XML-Serialization based on cayenne,
but based on a Query.
Our Web-Interface sends a XML-Stream with a Query-Information
and gets back the Query-Result as tree.
The main problem was reducing the object-tree to the neccessary
information, because otherwise the XML-Response would get
much to big.
So we designed an own XML-Query format where you can give a exact
definition what attributes and what relations you want in the response.
This informations can defined for all relations ... a kind of recursiv.
It is only a partial aspect of what you are thinking about, but it helps a lot.
--- Juergen ---
andru..bjectstyle.org schrieb am 07.12.04 21:23:51:
>
> Yes, DataContext can be serialized and passed around... It supports Java
> serialization already, and some sort of brute-force XML serialization can
> be implemented as well... I am not sure that's the best way to handle
> compatibility with WebRowSet though...
>
> I am not intimately familiar with the whole javax.sql.rowset.* API, but it
> looks like implementing WebRowSet compatibility may have some synergy with
> the distributed DataContext feature that we plan for 1.2, and in general
> make Cayenne open to use with any remote clients. So I am very interested
> in continuing this discussion here.
>
> First a few question - Is client going to use its own implementation of
> WebRowSet interface and just read the incoming standard XML? Could you
> elaborate on the client architecture, in particular how the initial query
> to obtain a RowSet is done?
>
> Now a few notes.... RowSet is a tabular abstraction of data. ORM is a tree
> (or rather a graph) of objects. So transfering a full DataContext to the
> client just to have a single table of values maybe an overkill (now if you
> can change the requirements and forget about WebRowSet and just use
> Cayenne on the client, that's another story...). WebRowSet is better
> represented in Cayenne as a DataRow query -
> http://objectstyle.org/cayenne/userguide/perform/data-rows.html - than a
> full-blown DataContext. Looks like that's what you'll have to serialize
> and pass around. This can be done with some sort of adapter to a
> server-side DataContext. If you want to write such adapter, please keep us
> posted on the progress (maybe on cayene-devel list)...
>
> Thanks
> Andrus
>
>
>
> > Hi,
> >
> > From the TSS article:
> >
> > | DataContext is "disconnected" and uses Cayenne
> > | runtime for connectivity, [...]
> > | DataContext is serializable, together with all
> > | its objects, and can span multiple transactions.
> >
> > I got the need of serializing a DataContext in XML, send it to a client
> > that understands the format of a WebRowSet, modify it there, send it
> > back, reconstruct it in object form and apply the changes to the
> > database.
> >
> > 1) Is that possible at all?
> > 2) I understand that the XML serialization part is out of scope for
> > cayenne, so what would you use for it? XMLBeans, JSX, ...
> >
> > Thanks in advance from a newbie,
> >
> > Pepe Pérez.
>
>
>
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
This archive was generated by hypermail 2.0.0 : Wed Dec 08 2004 - 03:50:09 EST