IIRC the other option is to turn lazy off so your collection aren't
proxied, which may make sense in a web service environment where
you'll probably need to gather all the objects anyways.

Hmm, wasn't aware you could use OSIV with axis2.

HTH,
Robert

On 8/22/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm doing just that. I've got a web application that has the axis2
> libraries. It provides a web service as well as a web application that
> maintains a database. I use the Spring library to provide both the web
> service and the application with a DAO that interfaces with Hibernate. I use
> Spring's OpenSessionInViewFilter to keep the session open until the final
> result is rendered, whether it's axis or a jsp doing the rendering.
>
> If you don't want to use spring, you can write your own servlet filter that
> opens a Hibernate session coming in and closes it going out.
>
> Michael Davis
> from sunny Ottawa
>
>
> -----Original Message-----
> From: Steve S [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 21, 2007 4:36 PM
> To: axis-user@ws.apache.org
> Subject: Returning Hibernate detached objects in Axis2
>
>
> Has anyone tried to return a Hibernate detached object in an Axis2 web
> service? I have an object with lazy-loaded collections of objects. When I
> try to call the web service, I get a LazyInitializationException because the
> serializer (Axiom? StAX?) is trying to iterate over the collection. What I
> need is a way to skip the attribute if it is a PersistentSet that hasn't
> been initialized.  I suspect that the actual coding is pretty simple, the
> trick is figuring out where to put it, and how to get Axis to use it.
>
> Does anyone have any ideas?
>
> Thanks,
>
> Steve
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to