• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can a Entity Bean have both Local/Remote View

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic