I am developing a Http-based service application adopting Hessian and Hibernate. But when trying to use detached Hibernate object in client side, I got LazyInitializationException all along. From Spring Reference Guide, I knew it's one bug of Hessian as it can't support the complex Hibernate Objects with Collection properties. However, it is very common to have to map out such Hibernate Objects as there must be one-to-many association even in a tiny relational database. RMI are supposed to work nicely with these objects but are not firewall-friendly. The book of Manning in Hibernate suggest to use DTO. Does anyone have better idea for this issue?


Reply With Quote