I'm using iBatis 2.3.0, and have been for some time. A new requirement has come along and I will need to expose some of our applications services to external parties. Not an issue using Spring. I have lot's of choices. (I think I'm going to tread down the path of the simple HTTP exporter to begin with) The problem I have is that a good portion of my domain objects have adjacent domain objects (parent-child) in which the children are lazy loaded. This of course will not work when serializing the domain object over the wire. So I understand that I have several options available to me:
- Don't use lazy loading. Load the complete object graph using joins. (This could be intensive..)
- Don't expose methods that return objects that have complex relationships. (Yeah, right...)
- rework my domain objects so that complex objects are not returned, only single layer objects. (This would require the client to make additional calls to retrieve the adjacent objects.
I'm certain many of you have come across this issue and have several solutions that are working well. I'm just trying to get some suggestions and see if I've overlooked something.
Thanks for the help...
