You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rajesh kalluri <ra...@manduca.com> on 2002/03/05 18:37:18 UTC

Has any one used struts with castor as a persistence mechanism....

Hi All,

Has any one tried to use struts with castor XML frame work for persistence
if so could you please share your experiences and throw soem guidance.

1-As a starting point i have tried to generate java classes from a schema
using source generator of castor.

2-I have made ActionForm as my super class to the generated classes.

3-Unfortunately if i want to use the marshalling and un marshalling power of
castor i have to generate marshall/unmarshall/valiate methods, this is where
i run into problems as the validate method of ActionForm clashes with them.

4- To over come this i may have to generate two sets of beans with the
source generator one as FormBeans and one with marshall/unmarshall capacity

5 Then i  can use some commons utilities to transfer data from form beans to
data beans and persist them

6 I feel this will be a nice way of xml round tripping, even though i am
aware of similar solutions using digester and other utils.

Please let me know if  this process can be refined if any one has similar
experience

Regards
Rajesh


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Has any one used struts with castor as a persistence mechanism....

Posted by John Menke <jo...@eagleinfosystems.com>.
Check out http://chiki.emaho.org  Ghoot has source code available and uses
castor.

-----Original Message-----
From: rajesh kalluri [mailto:rajesh@manduca.com]
Sent: Tuesday, March 05, 2002 12:37 PM
To: Struts Users Mailing List
Subject: Has any one used struts with castor as a persistence
mechanism....


Hi All,

Has any one tried to use struts with castor XML frame work for persistence
if so could you please share your experiences and throw soem guidance.

1-As a starting point i have tried to generate java classes from a schema
using source generator of castor.

2-I have made ActionForm as my super class to the generated classes.

3-Unfortunately if i want to use the marshalling and un marshalling power of
castor i have to generate marshall/unmarshall/valiate methods, this is where
i run into problems as the validate method of ActionForm clashes with them.

4- To over come this i may have to generate two sets of beans with the
source generator one as FormBeans and one with marshall/unmarshall capacity

5 Then i  can use some commons utilities to transfer data from form beans to
data beans and persist them

6 I feel this will be a nice way of xml round tripping, even though i am
aware of similar solutions using digester and other utils.

Please let me know if  this process can be refined if any one has similar
experience

Regards
Rajesh


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>