aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Can a Entity Bean have both Local/Remote View Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Can a Entity Bean have both Local/Remote View" Watch "Can a Entity Bean have both Local/Remote View" New topic
Author

Can a Entity Bean have both Local/Remote View

Vinoth Selvaraj
Greenhorn

Joined: Jun 07, 2006
Posts: 18
Hi,

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

Joined: Aug 26, 2001
Posts: 7610
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.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Renato Groffe
Ranch Hand

Joined: Feb 27, 2006
Posts: 50
Hi!

If you have the HFEJB book, please see the page 157 on the Client View chapter. This page have a good explanation about this.



Originally posted by Vinoth Selvaraj:
Hi,

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


SCJP 1.4 -- 95%<br />SCWCD 1.4 -- 91%<br />SCBCD 1.3 -- In progress
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

I know the Rational Application Developer Tool allows you to have both at the same time, and it doesn't cause any problem at deployment time.

-Cameron
 
 
subject: Can a Entity Bean have both Local/Remote View