If you want to avoid the lazy init error when effortlessly exposing Hibernate enhanced objects via XFire and alike services all you need to do is front the service URL with filter that makes sure that Hibernate session is available for the duration of the request.
That is less work then rendering XML in rest fashion. On Sat, Mar 15, 2008 at 6:39 PM, xdirewolfx <[EMAIL PROTECTED]> wrote: > > Hi > > Basically I have been working alot of spring and hibernate stack. > Everything > is fine until you need to actually expose web service which comprises of > part of your domain models. Hibernate will let you go in a loop or you > will > run into a famous error (lazily init :)). As such I have always used DTOs > to > deliver my ws data. (I hate DTOs by the way) > > When I look at wicket, you can safely render the content in XML so I > thought > if I say expose my url .../MyService and param1, param2 etc... in a rest > like manner to let other applications consume (using wicket models so no > more DTOs to write). Just to check if it is done by anyone and what may be > the drawback of this. > -- > View this message in context: > http://www.nabble.com/Sanity-check%3A-rendering-xml-to-be-comsumed-by-other-applications-tp16074721p16074721.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206)