[EMAIL PROTECTED] writes:
>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?

We have implemented something very similar to 2: Every entity Bean has a
getValue() setValue() methods that return a "Value" type object. Such
object, a copy of the accesible attributes of the bean, becomes a client
cache for the bean. You thus avoid remote calls for every get/set method.

Only issue: Dirty reads. You must either live with them or start a
transaction when you load the bean.
>
>
>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".



  Manuel Garber
  ACG Boston Office
  Tel: (781) 229 0850 Ext. 4047
  FAX: (781) 229 2820
  pager: 888 602 3277

----
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".

Reply via email to