Lisa,

It will not be cached by default. You can always make a client-side proxy that hides 
all the details of loading and caching data, so the GUI code makes getSurname, 
getPOBox, etc. For example:

public class CustomerProxy{

    // Remote reference
    Customer customer;

    // Helper
    boolean loaded = false;

    // Data
    String surname;
    // ....

    public CustomerProxy(Customer customer){
        this.customer = customer;
    }

    public String getSurname(){
        load();
        return surname;
    }

    /**
     * Load data from Customer
     */
    protected void load(){
        if(!loaded){
            // Get all attributes from customer. e.g. Hashtable tbl = 
customer.getAllAttributes();
            // Set all instance variables from the hashtable
        }
    }
}

This is only a simple example that could be extended a lot, by allowing the 
CustomerProxy to be instansiated with a home, etc. I guess Rickard �bergs SmartProxies 
could be a help as well.

Hope this helps
/Tommy


>Hi all,
>
>Just a quick question. If an EntityBean (for example Person) has a data
>member "surname" cached when created, then if a client should call
>getSurname() on the remote interface, will this call involve a remote
>lookup, or will it refer to the *_ServiceStub.class for the cached
>information.
>
>Thanks in advance, Lisa
>
>===========================================================================
>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".
>
>

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

Reply via email to