> > Problem is, this interface kills the Isis introspector - it eventually hits
> > interface org.apache.cayenne.util.XMLSerializable, which has a List
> > (Collection) parameter.
> >
> > I have two options:
> > 1) Somehow disable the Isis introspector from walking down the
> > Cayenne Persistor interface, or
> >
>
> I'd imagine this ought to be possible by writing a FacetFactory similar
> to RemoveJavaLangObjectMethodsFacetFactory
> or RemoveJavaLangComparableMethodsFacetFactory. This would remove any of
> the methods in the provided type (ie the cayenne interface).
This might also have been able to solve the earlier problems faced by
Iain Flynn[1] earlier.
> > 2) Do some byte-code magic that is somehow able to wrap the users
> > domain class picked up by Isis into something which implements
> > Persisted, and can be given to Cayenne to instantiate.
> >
>
> This would be more elegant, but also more work.
>
> The CgLibClassProxyFactory (and Javassist equivalent) work by (on-the-fly)
> creating a subclass of the provided class. I imagine that this subclass
> could implement the cayenne interface.
Do they operate on *instances* of the class (e.g. after New ), or on
definitions of the class: If I have
class Customer {
}
can I use CgLibClassProxyFactory to runtime create:
class CgCustomer extends Customer implements Persistor {
}
so that Cayenne can call "newInstance" and create an instance of
CgCustomer ?
> ~~~
> Just another thought; I know you have a distaste of the JPA annotations
> etc, but even so my JPA object store - currently mothballed because it has
> a dependency on the LGPL Hibernate library - might be easier to get fully
> working, probably by porting to OpenJPA [1]. My view, for what it's worth,
> is that JPA is more mainstream than Cayenne (and would help Isis grow its
> userbase if we had it as a supported object store....).
The other option could be to provide a decorator / annotator service to
automagically add annotations based on assumptions, similar to how
the SQL objectstore creates automappers at the moment?
And what about JDO?
> I think that Mark is involved in OpenJPA - Mark, can you comment on how
> OpenJPA picks up its metadata: is it only annotations, or is it optionally
> XML, or even can it just infer some stuff?
>
> [1] http://openjpa.apache.org/
[1] http://isis.markmail.org/message/z6ssovojrniuttkd