You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Anthony Knights <an...@db.com> on 2004/06/09 17:19:26 UTC

Feature Request for XMLBeans Version 2

I have recently been working with XMLBeans and (independently) Spring using Hibernate for persistence.

In a prototype for a new system component I though it would be nice to try and use all 3 technologies together to provide a seamless XML -> Java Object -> DB -> Java Object -> XML data flow.

This would allow me to define my data-structure using XML schemas and to generate the rest of the related code using the various tools:
      Generate the Java Objects using XMLBeans
      Generate the DB DDL using Hibernate

The idea of being able to strongly define my data model using the rich syntax of XML schemas and employing a 'write once, generate everything else' approach seemed highly appealing.
There has, however, been a drawback to this:

The XMLBeans SchemaCompiler class does not provide default, no-args constructors for the generated classes.  A default, no-arg constructor is required for each and every object that is to be persisted with Hibernate.
I am therefore asking if it would be possible for Version 2 of XMLBeans to support an option for creating no-arg constructors in the generated classes.  This would make for very nice integration with the open-source Spring and Hibernate frameworks.

Thank you very much for your attention.

Kind regards,

Anthony Knights

===============================
Derivatives Trade Capture Services
Global Markets Derivatives Technology
Deutsche Bank
Phone:  +44 (0) 207 5458184
===============================



--

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Re: Feature Request for XMLBeans Version 2

Posted by nn <nn...@comcast.net>.
Hi,
I was thinking the similar line to comibe these XML based technology(I was
using aspectwerkz instead for AOP framework).
But there are significant difference for XMLScheme targeted data model and
ordinary JavaBeans. Namely they only handle tree structure data(DOM). So
event if XMLBeans supported defualt constructor, it resolve only portion of
the problems.
In particular setter semantics are totally different from ordinary object
orented 'pointer' assignment semantics.
When you assign a node by a setter,  XMLBean 'copy' the node, so you will
never create network structure in XMLBeans.
Since Hibernate or relational database would handle general graph structure,
XMLBeans are not useful for such usage.

This is a current situation, but XML Schema and XPath, XQuery do not have to
necessarily limited to such tree structure or DOM model. At least
implementation level, it would be possible to handle general graph structure
with minor change(allowing multiple parents!).
jxpath seems targeting this direction, and (jxquery too).

nn


----- Original Message ----- 
From: "Anthony Knights" <an...@db.com>
To: <xm...@xml.apache.org>
Sent: Wednesday, June 09, 2004 8:19 AM
Subject: Feature Request for XMLBeans Version 2


> I have recently been working with XMLBeans and (independently) Spring
using Hibernate for persistence.
>
> In a prototype for a new system component I though it would be nice to try
and use all 3 technologies together to provide a seamless XML -> Java
Object -> DB -> Java Object -> XML data flow.
>
> This would allow me to define my data-structure using XML schemas and to
generate the rest of the related code using the various tools:
>       Generate the Java Objects using XMLBeans
>       Generate the DB DDL using Hibernate
>
> The idea of being able to strongly define my data model using the rich
syntax of XML schemas and employing a 'write once, generate everything else'
approach seemed highly appealing.
> There has, however, been a drawback to this:
>
> The XMLBeans SchemaCompiler class does not provide default, no-args
constructors for the generated classes.  A default, no-arg constructor is
required for each and every object that is to be persisted with Hibernate.
> I am therefore asking if it would be possible for Version 2 of XMLBeans to
support an option for creating no-arg constructors in the generated classes.
This would make for very nice integration with the open-source Spring and
Hibernate frameworks.
>
> Thank you very much for your attention.
>
> Kind regards,
>
> Anthony Knights
>
> ===============================
> Derivatives Trade Capture Services
> Global Markets Derivatives Technology
> Deutsche Bank
> Phone:  +44 (0) 207 5458184
> ===============================
>
>
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
>
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Re: Feature Request for XMLBeans Version 2

Posted by nn <nn...@comcast.net>.
Hi,
I was thinking the similar line to comibe these XML based technology(I was
using aspectwerkz instead for AOP framework).
But there are significant difference for XMLScheme targeted data model and
ordinary JavaBeans. Namely they only handle tree structure data(DOM). So
event if XMLBeans supported defualt constructor, it resolve only portion of
the problems.
In particular setter semantics are totally different from ordinary object
orented 'pointer' assignment semantics.
When you assign a node by a setter,  XMLBean 'copy' the node, so you will
never create network structure in XMLBeans.
Since Hibernate or relational database would handle general graph structure,
XMLBeans are not useful for such usage.

This is a current situation, but XML Schema and XPath, XQuery do not have to
necessarily limited to such tree structure or DOM model. At least
implementation level, it would be possible to handle general graph structure
with minor change(allowing multiple parents!).
jxpath seems targeting this direction, and (jxquery too).

nn


----- Original Message ----- 
From: "Anthony Knights" <an...@db.com>
To: <xm...@xml.apache.org>
Sent: Wednesday, June 09, 2004 8:19 AM
Subject: Feature Request for XMLBeans Version 2


> I have recently been working with XMLBeans and (independently) Spring
using Hibernate for persistence.
>
> In a prototype for a new system component I though it would be nice to try
and use all 3 technologies together to provide a seamless XML -> Java
Object -> DB -> Java Object -> XML data flow.
>
> This would allow me to define my data-structure using XML schemas and to
generate the rest of the related code using the various tools:
>       Generate the Java Objects using XMLBeans
>       Generate the DB DDL using Hibernate
>
> The idea of being able to strongly define my data model using the rich
syntax of XML schemas and employing a 'write once, generate everything else'
approach seemed highly appealing.
> There has, however, been a drawback to this:
>
> The XMLBeans SchemaCompiler class does not provide default, no-args
constructors for the generated classes.  A default, no-arg constructor is
required for each and every object that is to be persisted with Hibernate.
> I am therefore asking if it would be possible for Version 2 of XMLBeans to
support an option for creating no-arg constructors in the generated classes.
This would make for very nice integration with the open-source Spring and
Hibernate frameworks.
>
> Thank you very much for your attention.
>
> Kind regards,
>
> Anthony Knights
>
> ===============================
> Derivatives Trade Capture Services
> Global Markets Derivatives Technology
> Deutsche Bank
> Phone:  +44 (0) 207 5458184
> ===============================
>
>
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
>
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/