> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Delahunty
> However I was thinking, object serialization can take time especially for my
> complex objects. My objects happen to be immutable in the sense that they
> have no set Methods. So would it be ok to pass them by reference. For
> example implementing "java.rmi.remote" instead of "java.io.Serializable".
> Will this work with all app servers.
It's a trade-off. If you pass RMI stubs around, you will save on serialization
time but you will incur a network overhead each time you need to query a value on
your remote objects. It's up to you to decide which one is best.
One way to have your cake and eat a part of it is to implement lazy-loading for
your objects, or cause groups of fields to be fetched when you query one of them.
<vendor>
WLS 6.0 offers this functionality for finders, CMPs, CMRs and dependents:
ejbLoads() are basically empty and fields are lazy-loaded. You can specify groups
of fields and have the Persistence Manager fetch them all together when one of
them is read..
</vendor>
--
Cedric
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".