users@glassfish.java.net

Re: Object Serialization Performance

From: Stephen Connolly <stephen.alan.connolly_at_gmail.com>
Date: Fri, 19 Dec 2008 16:06:48 +0000

OK, so you use Lazy loading, but have you detached from the transaction at
the point of serialization?

If you are still within scope of the transaction, then all that will happen
is the object serialization process will pull down all the elements of the
collection via the lazy loading strategy...

Eager loading will pull down all the entries before serialization.

To avoid either, you'd need to get your entity detached from the [entity
manager / transaction] prior to serialization...

-Stephen

2008/12/19 <glassfish_at_javadesktop.org>

> Actually my Entity references itself.
> But when I load it from the database I use a lazy loading mode (contrary to
> the eager loading)
>
> So all my references are instance of IndirectSet {IndirectSet: not
> instantiated}.
> Maybe IndirectSet uses a lot of spaces ?
> [Message sent by forum member 'nlsbo' (nlsbo)]
>
> http://forums.java.net/jive/thread.jspa?messageID=322647
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>