users@glassfish.java.net

Re: WebService, persistence context and detach entity !!!

From: Sahoo <sahoo_at_sun.com>
Date: Fri, 18 May 2007 20:11:47 +0530

You need to set the appropriate relationships to null before returning
the objects from the business method so that the default serialization
mechanism can't reach those objects.
If you don't like this manual approach, then you may try annotating
certain fields as @XmlTransient which would be excluded from XML
serialization. Let us know if this strategy works.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> I want to detach the entity I query for, because if not the webservices produces an error about recursive association between Customer and Channel.
>
> Is there a way to query for a Customer object and return it in the webservice without returnin all its associated Channels?
>
> Thanks
> [Message sent by forum member 'apapap' (apapap)]
>
> http://forums.java.net/jive/thread.jspa?messageID=217829
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>