Hi,
the second alternative is definitely the way to go. If you are using
CMP, an entity bean usually represents one row in one table anyway so
your business objects will probably be created out of values from
several entity beans anyway.
Using the C-like record just representing the data read-only is also the
way Monson-Haefel advices on his website.
dirk
Alexandre Lefebvre wrote:
>
> Hi:
>
> Let say that you have a "customer" objects with a lots fields/attributes
> (name, address, phone, ....) that you have implemented as entity bean. In
> order to display all this attributes on the client GUI, you can do two
> things:
>
> 1. Call the get methods (getName, getAddress,...) one after another. I
> think each of these calls are a remote call. Therefore, to just show a
> "customer", one must perform a lots of remote calls that are very expensive
> (compared to local calls).
> 2. Have "customer" bean to return the all the attributes at once as an
> object to the client. That is, "customer" bean has a get() method that
> returns a object containing all the attributes (using C/C++ lingo, a
> structure). This way, the client is making one remote call, and a lots of
> local calls. If the object (structure) returned by the get() method of
> "customer" is implementing serializable interface, does the client get a
> copy of the object or just a reference to it? Where is the returned object
> resides, client or the EJB container?
>
> Is there any better way to avoid a lots of remote calls?
>
> Thanks,
> Ramin Javanbakht
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
--
Dirk Haase Schlund + Partner AG
[EMAIL PROTECTED] http://www.schlund.de
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".