Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can a Entity Bean have both Local/Remote View

 
Vinoth Selvaraj
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Renato Groffe
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic