• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

EJB Home And Select

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,

Please go through the following question from one of the mock exams.

Q) A typical use of ejbHome and ejbSelect method would be?
Select 2 Answers
A. use ejbSelect methods within ejbHome methods to return entities
B. use ejbSelect methods to access fields of a bean instance
C. use ejbHome methods to perform operation not specific to a entity instance
D. Use ejbHome methods to initialize entity bean instance variables

The Ans: given are B and C

I feel that A, C are correct.

Can any one please explain why option B is correct?
Thanks in Advance.
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

B. use ejbSelect methods to access fields of a bean instance



Looking at the option, it is not clear if it is referring to cmp fields or static final fields. Anyway, ejbSelect method can still access cmp fields, when called from business methods that are defined in component interface.
 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks keerthi for the reply,

But I feel that option A is also correct
A. use ejbSelect methods within ejbHome methods to return entities
We can use ejbSelect methods within ejbHome methods right.

Correct me if I am wrong.

Thanks
 
Keerthi P
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. You are right.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually I have use ejbSelect<method> within an ejbHome<method> I think this is not clear.

see example :

public Collection ejbHomeListAllUserWithActiveCart()throws FinderException{
Collection list = null;
list = ejbSelectAllUserWithActiveCart();
return list;
}
 
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic