Hello,

I have two Qs about SDO in Tuscany:

Q1. Why do the generated SDO interfaces (not implementations) not
extend DataObject? According to v2.1.1 of the Java JDO Spec, Page 64,
"the interface may extend DataObject [which in Tuscany it does not;
option?], and the implementation must always implement the DataObject
interface [which it does; so it wouldn't be a big deal to add it to
the interface".

IMHO this is useful, as it makes it possible to use generated
interfaces of SDOs as parameters to services using the dynamic
DataObject signature; see e.g.
https://github.com/vorburger/vorburgers-blueprints/blob/master/helloworld-ws-sdo-dyn/src/test/java/helloworld/HelloWorldClientTestCase.java

If this is only "because nobody has done it, but it seems like a good
idea", would a patch/contribution for this be welcome?

Q2. Is there a way in SDO to wrap an DataObject in a strongly typed
interface (could be implemented e.g. with dyn proxy) ? Say you have
received a DataObject o as an argument into a service (and have to
keep the DataObject in the service method's signature so it can can be
invoked with dynamic SDO), but want to implement the service using a
generated interface (which you'll generate on the server, but may not
have on the client), how do you turn the DataObject instance into
something statically typed? I was expecting the DataObject interface
to have something like a T as(Class<T> klass) kind of method, or to
find static T SomeHelper.as(DataObject o, Class<T> klass) ... not so?

If this list is not the appropriate place for general SDO related
questions like these, will you please point me to which other list is?

Thanks,
Michael
_______________________
Michael Vorburger
http://www.vorburger.ch

Reply via email to