Can a Entity Bean have both Local/Remote View

Is it possible to deploy an Entity bean with both the local and remote view?

If it is not possible, then why in J2EE RI deploytool, they have given option to select the classes for both the Remote and local Views for all the beans that are deployed??

Please clarify... And i have read in the sun website the following line:

"Although a bean can have both a local and a remote client view, typically a single enterprise bean provides only one of these two views. "

With Regards Vinoth Selvaraj

Valentin Crettaz

Gold Digger
Sheriff

Posts: 7610

posted 10 years ago

From the EJB 2.1 specification, section 9.3 states:

Entity beans that have container-managed relationships with other entity beans, as described in Chapter 10, �Entity Bean Component Contract for Container-Managed Persistence�, must be accessed in the same local scope as those related beans, and therefore typically provide a local client view. In order to be the target of a container-managed relationship, an entity bean with container-managed persistence must provide a local interface.

While it is possible to provide both a client view and a local client view for an entity bean with container-managed persistence, it is more likely that the entity bean will be designed with the local view in mind.