Hi all,
It'll probably come home to me one of these days that if I want an answer I should post a straightforward question rather than first posting tons of code (as in my previous posting) :wink:.
So, here's my question:
I have a form where the user manipulates a whole hierarchy of child objects under a single parent object.
I want to create a fairly thin service layer as a transactional boundary.
I need to somehow bind the incoming data to my whole hierarchy of domain objects.
I could let the Spring SimpleFormController bind directly to the domain objects, but then this happens in my UI layer, outside of the transactional context. So this implies loading the parent object in one transaction (touching all required collections), and then persisting the parent object in another transaction. Which seems a bit messy.
So, how are other people designing the interface to their service layer?
Does Spring bind to the service object using setProperty?
How does the service object then bind to the domain objects?
BTW, I thought of writing a service interface which simply takes a Map of parameters (e.g. request.getParameterMap()) and performs Spring DataBinder binding internally to the domain objects. Does this seem like a reasonable approach?
Best regards,


Reply With Quote
