Bruce,
Thank you for your reply.
> 'Unfortunately it is not possible to change the objectreference
> and commit it.'
>
> Is this due to the fact that the communication is occurring via a web
service?
>
> Bruce
My first assumption was that I could change the objectref to the marshalled
object
and commit this one. ObjectNotPersistentException is thrown this way...
Another idea would be to stream the object into the webservice and make
changes
to the object directly and send back and commit back the object....
We have to deal with a datamodel change runtime, so we cannot use this.
We change the datastructure by making changes into a DOM object and marshal
it.
This is where Castor is used... never ran into problems running xml
marshal/unmarshal ;-)
After this proces we use Castor JDO to save changes made. That's why the
question comes up " howto update jdo object in combination with xml ? "
Can I easily commit changes on an object which was originated from Castor
JDO,
but has lost its reference to the Castor persistent layer ?.
The answer is probably "no, you can't ", but you can't blame me for asking
Now we use this sort of a solution:
- receive a complete xml of changed object from webservice
- make a DOM object
- change datamodel/structure
- marshal it to Java object (A)
- load original from db (B)
- compare A with B
- make changes to B
- commit B
If anyone knows a pitfall or other known issue with this approach
or has any idea about the earlier question mentioned I would like to hear
it.
With regards,
Robin Hoogeboom
----- Original Message -----
From: "Bruce Snyder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 2:57 PM
Subject: Re: [castor-dev] howto update jdo object in combination with xml ?
> This one time, at band camp, Robin Hoogeboom said:
>
> RH>I'm using jdo and xml package of Castor in one environment.
> RH>
> RH>from DB:
> RH>
> RH>load object
> RH>unmarshal it to xml
> RH>send it to webservice
> RH>
> RH>to DB:
> RH>
> RH>get xml from webservice
> RH>marshal it to object
> RH>create in DB
> RH>
> RH>
> RH>For reading and creating of records it works fine. But now
> RH>i'm trying to find a solution for updating records in the DB.
> RH>
> RH>In the process of updating i need to load the record into a
> RH>data object and set all the values from the marshalled object.
> RH>Unfortunately it is not possible to change the objectreference
> RH>and commit it.
> RH>
> RH>I can imagine that this problem has kept someone busy before.
> RH>I'm interested in a solution to this one.
>
> Robin,
>
> Please explain this situation a bit further. I'm not following the
statement:
>
> 'Unfortunately it is not possible to change the objectreference
> and commit it.'
>
> Is this due to the fact that the communication is occurring via a web
service?
>
> Bruce
> --
>
> perl -e 'print
unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev