• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF Final Mock Exam Q55

 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When Creating an entity bean using CMP which can be accessed through the bean's remote component interface?

E Accessor methods for persistent fields - legal just not a good idea


I don't under stand answer E
Can someone explain please?

They are still talking about a Container managed persistent field right?
I thought why is it legal for a client to access these methods?
 
Paul Codillo
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kris Reid:
When Creating an entity bean using CMP which can be accessed through the bean's remote component interface?

E Accessor methods for persistent fields - legal just not a good idea


I don't under stand answer E
Can someone explain please?

They are still talking about a Container managed persistent field right?
I thought why is it legal for a client to access these methods?



That's correct. As per EJB 2.0 specification, clients are not allowed to access bean methods directly. Clients have to go through the bean's component interface. If a client wishes to modify a persistent field of an entity, the way to do that is by way of the component interface.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic