We're using Hessian-Flex on a project, and we've just started to see some
odd errors recently where some secondary objects in our graph are coming
back with the wrong values.  To give some context, we're returning some
"ideas" that have associated categories (many-to-many) and reviews
(one-to-many) as well as other attached objects.

There are a relatively limited number of categories, so they tend to repeat
within a collection of ideas, where hessian will use object references.  We
haven't had this kind of repetition very often in our use of Hessian yet, so
the problem we're seeing is new to us.  Sometimes the idea category comes
back properly, other times it comes back as the wrong category, and other
times still it comes back as the wrong object altogether, which is
disturbing.

After doing some significant investigations on our end, I feel like I can
say fairly firmly that we're sending valid data to Hessian on the server,
and getting back invalid data from Hessian on the client.  And, although I'm
relatively new to the hessian-flex codebase, it seems to me that this is
probably because Hessian2Input doesn't clear it's reference cache on init(),
which ... I think it probably should, based on how I interpret the way these
classes work.

HessianOperation retains a single Hessian2Input object, which it calls
init() on.  The asdoc implies that init() is supposed to reset the state of
the object so that it can be reused.  And yet, I can clearly see that when
init() starts (or completes), the refs array can have values in it, and that
when an operation is called for the second or third time, the 'refs' start
getting lost.

I can presumably patch this myself; I'm happy to do so and submit it, but I
wanted to confirm with people more familiar with Hessian that what I was
seeing was in fact a bug, that the fix I'm proposing is the right fix.

   - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/
_______________________________________________
hessian-interest mailing list
hessian-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to