[Contrib: Evaluation System] Help with DB transactions when using AuthoringService API

Aaron Zeckoski aaronz at vt.edu
Fri Jan 22 07:33:15 PST 2010


On Fri, Jan 22, 2010 at 3:19 PM, Jim Eng <jimeng at umich.edu> wrote:
> I am using XStream to deserialize the XML.  XStream creates an EvalItem
> object with the EID set appropriately and all the properties set
> appropriately.  The id of that EvalItem is null.
>
> Once the servlet validates the properties in the new EvalItem object, we try
> to retrieve an EvalItem with the same EID.  If that's null, we save the new
> one that was created by XStream.  That works fine.  If it's not null, we
> systematically copy property values from the new item into the one that was
> retrieved from the AuthoringService, and then we save that one.
>
> Is it possible that something in XStream might be interacting with
> hibernate?  Do you think the constructor for an EvalItem cause any hibernate
> activity?

I don't think so. The classes themselves have no hibernate bindings.
What you are doing sounds like it should work though you may need to
be careful that you are not loading up any items twice (I would hope
that is ok but hibernate is weird sometimes).

-AZ


More information about the evaluation mailing list