• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

mock exam questions

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In headfirst chapter 6 mock exam question one is as follows.
______________________________________________________________________
1. What's true for a bean provider when creating an entity bean using container-managed persistence?
The solution given is
C. When implementing a one-to-many relationship, the java.util.List interface must not be used.
______________________________________________________________________
What is meant by a one-to-many relationship in this context? If possible give an example. Why is there a question about relationships in chapter 6, when entity bean relationships are not covered until chapter 7??? Isn't this question a bit premature?

In the solution to question 16 on page 371 the note say that the bean needs to be loaded because it may have cascading deletes to take care of. I'm not sure why this is the case. Someone please elaborate on this point.
What is meant by question 18 which reads:
Which method(s) run in the transaction context ofthe method that cuses their invocation?
Please explain in laymen terms, keeping in mind at all times that I am an absolute begginer to this subject.


Thanks for your help.
[ December 06, 2003: Message edited by: Keith Rosenfield ]
[ December 06, 2003: Message edited by: Keith Rosenfield ]
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Keith,

What is meant by a one-to-many relationship in this context? If possible give an example. Why is there a question about relationships in chapter 6, when entity bean relationships are not covered until chapter 7??? Isn't this question a bit premature?


It is. You simply cannot reply to it till you read and study the next chapter. I guess it was not on purpose.

In the solution to question 16 on page 371 the note say that the bean needs to be loaded because it may have cascading deletes to take care of. I'm not sure why this is the case. Someone please elaborate on this point.


Let's say that bean A as a one-to-one or one-to-many relationship with bean B, that bean B has <cascade-delete /> for this relationship. When bean A is removed, the container is responsible cascade delete to bean B. I understand from Kathy's explanation that to perform that, it needs that bean A is synchronized with the db, so ejbLoad() could be called on bean A. It's just my interpretation though.

What is meant by question 18 which reads:
Which method(s) run in the transaction context ofthe method that cuses their invocation?


Will be clearer when you'll be at chapter 9 which deals with transactions.
Best,
Phil.
[ December 06, 2003: Message edited by: Philippe Maquet ]
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Phillipe.
I guess I'll need to read to the text at least twice. It's a challenge to keep all of this information straight.
 
For my next trick, I'll need the help of a tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic